<img height="100" src="./public/logo.png">

# SugaHRM API

API Backend of HR Management

## Requirement

- Laravel 6
- PHP >= 7.2.5
- MariaDB 10.2.*

## Installation

- Clone project
- Go to the folder application using cd command on your cmd or terminal
- Run `composer install` on your cmd or terminal
- Copy `.env.example` file to `.env` on the root folder.
  You can type copy .env.example .env if using command prompt Windows
  or `cp .env.example .env` if using terminal, Ubuntu
- Open your `.env` file and change the database name (`DB_DATABASE`) to whatever you have,
  username (`DB_USERNAME`) and password (`DB_PASSWORD`) field correspond to your configuration.
- Run `php artisan key:generate`
- Run `php artisan migrate` to create database
- Run `php artisan db:seed` to add default data to database
- Run `php artisan permissions:autoload` to load Permissions from Controllers and add to default Roles
- Run `php artisan passport:install`
- Run `php artisan storage:link` to create the symbolic link to your storage folder so that you can access it easier.
- Run `php artisan serve`
- Go to <http://localhost:8000/>

## Usage

## Utils

Run `php artisan salary:reset --account_id={id}>` to reset salary for account has id = {id}

Run `php artisan settings:reset --key={key1} --key={key2}`
to reset settings by keys to defaults based on SettingsTableSeeder.
If the `key` option is not used, the command will reset all settings

## Changelog

Please see [CHANGELOG](./CHANGELOG.md) for more information what has changed recently.

## Maintainer

Teanis Website Team

## License

© 2021 Teanis
