nomanur / sanctum-crud
a sanctum starter for laravel
v1.0.4
2023-10-19 14:02 UTC
Requires
- php: ^7.4|^8.1
- illuminate/support: *
Requires (Dev)
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^9.0
README
Installation
You can install the package via composer:
composer require nomanur/sanctum-crud
Usage
Add this in User Model
public function roles() { return $this->belongsToMany(Role::class, 'user_roles'); }
After That
php artisan migrate
run that to generate migration and which will also seed role in roles table.
php artisan sanctumcrud:route
all the routes will be added in your routes\api.php and check php artisan route:list to see all the routes.
After That
php artisan vendor:publish
Publish Nomanur\SanctumCrud\SanctumCrudServiceProvider
And
php artisan migrate
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 nomanurrahman@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.