Search
 
SCRIPT & CODE EXAMPLE
 

PHP

laravel seeder multiple column

    public function run()
    {
        $subsubcategory = [
            ['id' => 6, 'name' => 'Road bicycles', 'sub_category_id' => 13, 'is_published' => 1],
            ['id' => 7, 'name' => 'Hybrid bicycles','sub_category_id' => 13, 'is_published' => 1],
            ['id' => 8, 'name' => 'Mountain bicycles', 'sub_category_id' => 13, 'is_published' => 1],
            ['id' => 9, 'name' => 'Tandem bicycles','sub_category_id' => 13, 'is_published' => 1],
            ['id' => 10, 'name' => 'Bmx 20','sub_category_id' => 16, 'is_published' => 1],
            ['id' => 11, 'name' => 'Kids bicycles 24"','sub_category_id' => 12, 'is_published' => 1],
            ['id' => 13, 'name' => 'Kids bicycle 20"','sub_category_id' => 12, 'is_published' => 1],
            ['id' => 14, 'name' => 'Kids bicycles 18"','sub_category_id' => 12, 'is_published' => 1],
            ['id' => 15, 'name' => 'Kids bicycles 16"','sub_category_id' => 12, 'is_published' => 1],
            ['id' => 16, 'name' => 'Kids bicycles 14"','sub_category_id' => 12, 'is_published' => 1],
            ['id' => 17, 'name' => 'Kids bicycles 12"','sub_category_id' => 12, 'is_published' => 1],
            ['id' => 18, 'name' => 'Bmx 16','sub_category_id' => 16, 'is_published' => 1],
            ['id' => 19, 'name' => 'Bmx 14','sub_category_id' => 16, 'is_published' => 1],
         ];

        SubSubCategory::insert($subsubcategory);
    }
Comment

PREVIOUS NEXT
Code Example
Php :: my xampp 
Php :: doctrine findby criteria 
Php :: Notice: Trying to access array offset on value of type bool in /usr/www/users/easygrb/storage/modification/catalog/controller/startup/startup.php on line 169 
Php :: enable cors cakephp 
Php :: regex sl nic validation laravel 
Php :: error logs wp 
Php :: how did peppa pig die 
Php :: wp-admin File not found (404 error) 
Php :: authenticate user with phone laravel 
Php :: phpunit check exception not thrown 
Php :: views_pre_view 
Java :: dependency for spring security 
Java :: convert string to localdatetime 
Java :: java console text color 
Java :: convert input stream to string java 
Java :: string to double java 
Java :: react-native force rtl on android 
Java :: how to clear the screen by pressing a key in java 
Java :: java remove empty lines from string 
Java :: java selenium new empty window 
Java :: java remove first character from string 
Java :: convert a string to int in java 
Java :: from string to int android studio 
Java :: set color of text for jlabel 
Java :: localdatetime to xmlgregoriancalendar 
Java :: padding a string with 0 in java 
Java :: android settextcolor programmatically 
Java :: textview set text bold programmatically 
Java :: how to print elements in matrix java 
Java :: how to register event spiot 
ADD CONTENT
Topic
Content
Source link
Name
9+5 =