khancode / laravelbaserest
:description
2.0.4
2023-12-21 10:14 UTC
Requires
- illuminate/support: >=5
- laravel/framework: >=5.5.0
- laravel/passport: >=4.0
Requires (Dev)
- mockery/mockery: ^1.1
- orchestra/testbench: ~3.0
- phpunit/phpunit: ~7.0
- sempro/phpunit-pretty-print: ^1.0
README
This is where your description should go. Take a look at contributing.md to see a to do list.
Installation
Via Composer
$ composer require khancode/laravelbaserest
Publish
$ php artisan vendor:publish --tag=laravelbaserest.lang
Usage
Searching
Parameter
search
search_column
search_text
search_condition ["and, or"]
search_operator ["=, !=, <, <=, >, >=, like"]
search array
search_column[0]
search_text[0]
search_condition[0] ["and, or"]
search_operator[0] ["=, !=, <, <=, >, >=, like"]
sort
sort_column
sort_type ["asc, desc"]
sort array
sort_column[0]
sort_type[0] ["asc, desc"]
hide attribute
default show_{{attr_name}} = 1
to hide attribute show_{{attr_name}} = 0
this for base model
use KhanCode\LaravelBaseRest\BaseModel;
this for base Repository
use KhanCode\LaravelBaseRest\BaseRepository;
this for base Service
use KhanCode\LaravelBaseRest\BaseService;
add this code if you want to use json default base return at App\Exceptions\Handler.php
public function render($request, Exception $exception)
{
if( method_exists($exception,'responseJson') )
{
return $exception->responseJson();
}
return parent::render($request, $exception);
}
Change log
Please see the changelog for more information on what has changed recently.
Testing
$ composer test
Contributing
Please see contributing.md for details and a todolist.
Security
If you discover any security related issues, please email amalsholihan@gmail.com instead of using the issue tracker.
Credits
License
license. Please see the license file for more information.