Skip to content

1. Getting started

Ross edited this page Apr 10, 2020 · 1 revision

Installation

Via Composer

$ composer require rossity/laravel-json-api-scaffolder

Commands

Create a new model config file

$ php artisan scaffold:config {model}
  • Creates a config file at scaffolding/Modelname.php
  • {model} should be the Study/Pascal formatted ModelName
  • Will give you prompts on the creation of your model and scaffolds

Scaffold the application based on the config files located in scaffolding/

$ php artisan scaffold:application
  • Scaffolds the application, placing the files where they should go
  • Overwrites files if they already exist (except for migrations), so be very careful with this command
  • Prints routes to the console, for easy copy + pasting to your API routes file
Clone this wiki locally