[RSS Feed/News] Add data in newly created table in Addon's Setup.php file

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
So the addon that I'm building has this in the Setup file

PHP:

Code:
public function installStep1()
{
    $this->schemaManager()->createTable('xf_asp_fb_sport', function(Create $table)
    {
        $table->addColumn('sys_id', 'int')->autoIncrement();
        $table->addColumn('title', 'varchar', 20);
        $table->addPrimaryKey('sys_id');
    });
  
    // table has been created, dump some sample data into it
    $db = $this->db();
    $db->insert('xf_asp_fb_sport', [
        'title'  =>...

Read more

ادامه مطلب...
 
Status
Not open for further replies.
Back
Top Bottom