PHP Classes

How to Use a PHP API Generator to Access Larabel Model Classes Using the Package Laravel API Generator Library: Generate API to manage records of model classes

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-08-21 (14 days ago) RSS 2.0 feedNot yet rated by the usersTotal: 13 This week: 1All time: 11,366 This week: 47Up
Version License PHP version Categories
laravel-api-generate 1.0.0Custom (specified...5PHP 5, Libraries, Web services, Code ...
Description 

Author

This package can generate API to manage records of model classes.

It provides a Laravel service class that can register API generator classes.

The package can generate an API to perform operations to access Laravel application model classes using Artisan the command line console.

Picture of Bhavin Gajjar
  Performance   Level  
Name: Bhavin Gajjar <contact>
Classes: 3 packages by
Country: India India
Innovation award
Innovation award
Nominee: 2x

Documentation

Laravel API Generator With Resources

Latest Version on Packagist Build Status Quality Score Total Downloads StyleCI

This package is used to generate laravel api with Resources

Installation

You can install the package via composer:

composer require bhavingajjar/laravel-api-generator

Publish Configuration File

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

Usage

php artisan api:generate --model=User

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email gajjarbhavin22@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


  Files folder image Files (23)  
File Role Description
Files folder image.github (1 directory)
Files folder imageconfig (1 file)
Files folder imagesrc (3 files, 3 directories)
Files folder imagetests (1 file)
Accessible without login Plain text file .editorconfig Data Auxiliary data
Accessible without login Plain text file .scrutinizer.yml Data Auxiliary data
Accessible without login Plain text file .styleci.yml Data Auxiliary data
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file CHANGELOG.md Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file CONTRIBUTING.md Data Auxiliary data
Accessible without login HTML file index.html Doc. Documentation
Accessible without login Plain text file LICENSE.md Lic. License text
Accessible without login Plain text file phpunit.xml.dist Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file _config.yml Data Auxiliary data

  Files folder image Files (23)  /  .github  
File Role Description
Files folder imageworkflows (1 file)

  Files folder image Files (23)  /  .github  /  workflows  
File Role Description
  Accessible without login Plain text file main.yml Data Auxiliary data

  Files folder image Files (23)  /  config  
File Role Description
  Accessible without login Plain text file config.php Aux. Configuration script

  Files folder image Files (23)  /  src  
File Role Description
Files folder imageCommands (1 file)
Files folder imageMiddleware (1 file)
Files folder imageresources (1 directory)
  Plain text file LaravelApiGenerator.php Class Class source
  Plain text file LaravelApiGeneratorFacade.php Class Class source
  Plain text file LaravelApiGeneratorServiceProvider.php Class Class source

  Files folder image Files (23)  /  src  /  Commands  
File Role Description
  Plain text file GenerateApi.php Class Class source

  Files folder image Files (23)  /  src  /  Middleware  
File Role Description
  Plain text file ApiHeaderInject.php Class Class source

  Files folder image Files (23)  /  src  /  resources  
File Role Description
Files folder imagestubs (3 files)

  Files folder image Files (23)  /  src  /  resources  /  stubs  
File Role Description
  Plain text file collection.stub Class Class source
  Plain text file controller.stub Class Class source
  Plain text file resource.stub Class Class source

  Files folder image Files (23)  /  tests  
File Role Description
  Plain text file ExampleTest.php 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 Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:13
This week:1
All time:11,366
This week:47Up