| Recommend this page to a friend! | 
|  Download | 
| Info | Documentation |  Files |  Install with Composer |  Download | Reputation | Support forum | Blog | Links | 
| Ratings | Unique User Downloads | Download Rankings | ||||
| Not yet rated by the users | Total: 43 | All time:  10,860 This week: 455  | ||||
| Version | License | PHP version | Categories | |||
| laravel-api-generato 1.0.0 | Custom (specified... | 5 | PHP 5, Libraries, Web services, Code ... | 
| Description | Author | ||||||||||||||||||||||
| This package can be used to generate a REST API from a Laravel model. | 
 | ||||||||||||||||||||||
This package is used to generate laravel api with Resources
You can install the package via composer:
composer require bhavingajjar/laravel-api-generator
php artisan vendor:publish --provider="Bhavingajjar\LaravelApiGenerator\LaravelApiGeneratorServiceProvider" --tag="config"
Next, if you plan for cross origin support, you should add middleware to your api middleware group within your app/Http/Kernel.php file:
'ApiHeaderInject'
add in env
for allow cross origin support
API_ALLOW_CROSS_ORIGIN = true
for json content type
API_JSON_RESPONSE = true
php artisan api:generate --model=User
composer test
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.
|  Files (23) | 
| File | Role | Description | ||
|---|---|---|---|---|
|  .github (1 directory) | ||||
|  config (1 file) | ||||
|  src (3 files, 3 directories) | ||||
|  tests (1 file) | ||||
|    .editorconfig | Data | Auxiliary data | ||
|    .scrutinizer.yml | Data | Auxiliary data | ||
|    .styleci.yml | Data | Auxiliary data | ||
|    .travis.yml | Data | Auxiliary data | ||
|    CHANGELOG.md | Data | Auxiliary data | ||
|    composer.json | Data | Auxiliary data | ||
|    CONTRIBUTING.md | Data | Auxiliary data | ||
|    index.html | Doc. | Documentation | ||
|    LICENSE.md | Lic. | License text | ||
|    phpunit.xml.dist | Data | Auxiliary data | ||
|    README.md | Doc. | Documentation | ||
|    _config.yml | Data | Auxiliary data | ||
|  Files (23) | / | src | 
| File | Role | Description | ||
|---|---|---|---|---|
|  Commands (1 file) | ||||
|  Middleware (1 file) | ||||
|  resources (1 directory) | ||||
|  LaravelApiGenerator.php | Class | Class source | ||
|  LaravelApiGeneratorFacade.php | Class | Class source | ||
|  LaravelApiGeneratorServiceProvider.php | Class | Class source | ||
|  Files (23) | / | src | / | resources | / | stubs | 
| File | Role | Description | 
|---|---|---|
|  collection.stub | Class | Class source | 
|  controller.stub | Class | Class source | 
|  resource.stub | Class | Class source | 
| The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. | 
|  Install with Composer | 
|  | laravel-api-generato-2020-07-15.zip 13KB | 
|  | laravel-api-generato-2020-07-15.tar.gz 8KB | 
|  | Install with Composer | 
| Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
| 100% | 
 | 
 | 
| Applications that use this package | 
 If you know an application of this package, send a message to the author to add a link here.
 If you know an application of this package, send a message to the author to add a link here.