Sunday, October 30, 2022
how to use inker in laravel
Thursday, August 12, 2021
Friday, May 21, 2021
how to create model with the migration , seeder, factory , controller at same time ?
Syntax : php artisan make:model ModelNmae .
This command will create a model with ModelName. During the model creation, we can create a seeder, factory, controller, migration for the model .
Syntax: PHP artisan make: model Profile --all
for creating Migration only
PHP artisan make: model Profile -m
or
PHP artisan make: model --migration
similar way you can generate Factory
PHP artisan make: model Profile -f
or
PHP artisan make: model --factory
similar way you can generate Controller
PHP artisan make: model Profile -c
or
PHP artisan make: model --controller
similar way you can generate ControllerSeeder
PHP artisan make model Profile -s
or
PHP artisan make: model --seeder
Wednesday, May 19, 2021
Creating a Model In Laravel.
Synatx : php artisan make:model ModelName
Let's create a model for Product
So we in the terminal write PHP artisan make: model Product
Writing a factory in Laravel.
Creating a factory in laravel
Command: PHP artisan make: factory FactoryName
ex: PHP artisan make: factory ProductFactory or you can make it during creating Model
PHP artisan make: model ModelName --all (it creates a model, controller, factory, seeder, and migration)
in this case, we are creating a factory for Product so we put Product in the place of the model name
D:\www\crm (main)
λ php artisan make: factory RolesFactory --model=Role
Factory created successfully.
It generates a blank factory file
Monday, May 17, 2021
Create a controller in laravel.
To create a controller using the syntax:
λ php artisan make: controller ControllerName
Call Factory and make multiple record entry Using tinker
$d = Factory(App\Department::class,3)->create(); > $d = Factory(App\Department::class, 10)->create(); = Illuminate\Database\Eloqu...
-
We can pass the data to the view using help function with ( ) compact ( ) Using With Route :: get ( '/greet' , function () { ...
-
Syntax : php artisan make:model ModelNmae . This command will create a model with ModelName. During the model creation, we can create a see...



