Repository for PetaniKita Laravel Back-end API for authentication and product endpoints.
For API documentations, see our Postman API documentation.
- PHP >= v8.1
- Composer
- A database (Choose between MySQL, PostgreSQL, or SQLite. See the Laravel documentation)
- Clone the repository
git clone https://github.com/c23-ps419/petanikita-api
- Install dependencies using Composer
composer install
- Copy the
.env.example
file to.env
file
cp .env.example .env
-
Configure the configuration variables in
.env
file, except theAPP_KEY
variable -
Generate the
APP_KEY
environment variable usingartisan
command
php artisan key:generate
- Migrate the database
php artisan migrate
- (Optional) Populate your database with data
php artisan db:seed
- Run the server
php artisan serve