-
Notifications
You must be signed in to change notification settings - Fork 0
Resource controllers
Marco E edited this page Aug 28, 2020
·
1 revision
- Add the resource controllers:
vagrant@meeting-api:~/code$ php artisan make:controller API/MeetingController --api
vagrant@meeting-api:~/code$ php artisan make:controller API/RegistrationController --resource
vagrant@meeting-api:~/code$ php artisan make:controller API/AuthController- Keep only the
storeanddestroymethod in theRegistrationController.php. - Because we created the
MeetingController.phpfile with the--apitag thecreateandeditmethods are already not present in the file (which is what we want, so no need to modify this controller). - Add the
storeand thesigninmethods manually to theAuthController.php.
public function store (Request $request)
{
return "It works!";
}
public function signin (Request $request)
{
return "It works!";
}- For test purpose, add the return string
return "It works!";for every method of the 3 controllers.
meeting-API - 2020