|
|
4 years ago | |
|---|---|---|
| app | 4 years ago | |
| bootstrap | 4 years ago | |
| config | 4 years ago | |
| database | 4 years ago | |
| lang/en | 4 years ago | |
| public | 4 years ago | |
| resources | 4 years ago | |
| routes | 4 years ago | |
| storage | 4 years ago | |
| tests | 4 years ago | |
| .editorconfig | 4 years ago | |
| .env.example | 4 years ago | |
| .gitattributes | 4 years ago | |
| .gitignore | 4 years ago | |
| .styleci.yml | 4 years ago | |
| README.md | 4 years ago | |
| artisan | 4 years ago | |
| composer.json | 4 years ago | |
| composer.lock | 4 years ago | |
| package.json | 4 years ago | |
| phpunit.xml | 4 years ago | |
| webpack.mix.js | 4 years ago | |
README.md
Hydra
Zero config API Boilerplate with roles and abilities for Laravel Sanctum
Getting Started
It's super easy to get Hydra up and running.
- clone the project
git clone https://github.com/hasinhayder/hydra.git
- Copy
.env.exampleto.env
cp .env.example .env
That's mostly it! You have a fully running laravel installation with Sanctum, all configured.
Database Migration and Seeding
Open your .env file and change the DATABASE options. You can start with SQLite by following these steps
- Create a new sqlite database
touch database/hydra.sqlite
Or simply create a new file as hydra.sqlite inside your database folder.
- Run migration
php artisan migrate
Now your database has essential tables for user and roles management.
- Database Seeding
Run db:seed, and you have your first admin user, some essential roles in the roles table and the relationship properly setup.
php artisan db:seed
Please note that the default admin user is admin@hydra.project and default password is hydra. You should create a new admin user before deploying to production and delete this default admin user. You can do that using available Hydra user management API, or using any DB management tool.