Menu
About LCS
Eloquent ORM - Seeding
It helps to load database table with dummy data using seeding class which are located in database/seeder directory
Running Artisan command for a specific seeder
Step 01: Specifying migration definition of comments tableSchema::create('comments', function (Blueprint $table) { $table->id(); $table->text('comment_text'); $table->timestamps(); }); Step 02: Specifying data...
Category:
Eloquent ORM
3 years ago
Using Seeder and factory to create dummy data for User, Post and Comment model
Step 01: create fresh laravel projectcomposer create-project laravel/laravel postcomment Step 02: Setting Up migration, factory of Post model and migration,...
Category:
Eloquent ORM
3 years ago
Using seeder and factory to create dummy data for pivot table
Suppose there are three tables communities, topics, posts and one pivot table community_topic ( in singular ). Hence if we...
Category:
Eloquent ORM
3 years ago
Seeding additional fields and timestamps within pivot table
Step 01: create fresh laravel project composer create-project laravel/laravel advanced_pivot_table Step 02: Setting Up scaffolding migration of Role with artisan...
Category:
Eloquent ORM
3 years ago