Answers for "laravel use model function in controller"

5

create model with controller laravel

php artisan make:controller CustomersController --model=Customer
Posted by: Guest on January-01-2021
2

call model function in controller laravel

$model = new Model;
$model->func();
__________________________________
  or 
Model::func() // this function must be static to call it staticly ..
Posted by: Guest on June-22-2021
1

create model with controller laravel

php artisan make:model Customer
php artisan make:controller CustomersController --resource
Posted by: Guest on January-01-2021

Code answers related to "laravel use model function in controller"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language