You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hydra/README.md

67 lines
1.6 KiB

3 years ago
# Hydra - Zero Config API Boilerplate for Laravel Sanctum
3 years ago
Zero config API Boilerplate with user and role management API for Laravel Sanctum.
3 years ago
## Getting Started
It's super easy to get Hydra up and running.
1. clone the project
3 years ago
```shell
git clone https://github.com/hasinhayder/hydra.git
```
3 years ago
2. Copy `.env.example` to `.env`
3 years ago
```shell
cp .env.example .env
```
3 years ago
3. Start the webserver
```shell
php artisan serve
```
3 years ago
That's mostly it! You have a fully running laravel installation with Sanctum, all configured.
3 years ago
## Database Migration and Seeding
3 years ago
Open your `.env` file and change the DATABASE options. You can start with SQLite by following these steps
3 years ago
1. Create a new sqlite database
3 years ago
```shell
touch database/hydra.sqlite
```
3 years ago
Or simply create a new file as **hydra.sqlite** inside your **database** folder.
3 years ago
2. Run migration
3 years ago
```shell
php artisan migrate
```
3 years ago
Now your database has essential tables for user and roles management.
3 years ago
3. Database Seeding
3 years ago
Run `db:seed`, and you have your first admin user, some essential roles in the roles table and the relationship properly setup.
3 years ago
```shell
php artisan db:seed
```
3 years ago
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.
3 years ago
## List of Default Routes
Here is a list of default routes. Run the following artisan command to see this list in your terminal.
```
php artisan route:list
```
![Hydra - List of Default Routes](https://i.ibb.co/P629RbT/ezgif-5-78882ff5fc.webp)