July 2018
Intermediate to advanced
420 pages
8h 46m
English
Open your Terminal window and type the following command:
php artisan make:controller API/BuilderController --api
Note that the --api flag creates four methods for us inside the BuilderController class:
Open project/app/Http/Controllers/API/BuilderController.php and add the App\Builder code right after the Controller import.
Now, let's add the content for each method. Open project/app/Http/Controllers/API/BuilderController.php and replace the content with the following code:
<?phpnamespace App\Http\Controllers\API;use Illuminate\Http\Request;use App\Http\Controllers\Controller;use App\Builder; ...