Skip to content

Start Point to backend Rest API system builded with PHP and Laravel Framework

Notifications You must be signed in to change notification settings

alex-unruh/backend-base

Repository files navigation

BACKEND BASE

Start Point to backend Rest API system builded with PHP (7.4+) and Laravel Framework (9.48.0)

Features

  • Rest API's only. It has no visual interface
  • Complete CRUD with form request validation for users
  • First user record automatically created during migration
  • Thunder Client Collection available in root
  • Basic authentication configured to route api/login (to get token)
  • Sanctum authentication configured for all other routes (with bearer token)

How to configure

  1. Clone this repository
  2. To install dependecies run:
composer install
  1. Configure database connection in .env file
  2. Run:
php artisan migrate
  1. Import thunder-collection.json file in Thunder Client extension (VSCode) or Postman
  2. To start server, run:
php artisan serve
  1. Run the auth/login request in your client. This request need basic authentication with headers username: "admin@backend.com" and password: "admin01"
  2. Get the token returned in response and add into other requests as header Bearer Token
  3. By default a user must have the following attributes:
{
  "name": "John Doe",
  "email": "johndoe@backend.com",
  "password": "johndoe123",
  "profile": "Collaborator"
}
  • Profile attribute is optional
  • The password is needed only in store requests, but is optional in updates
  • By default, the profile attribute can be: "Administrator" (default) or "Collaborator". This can be configured in lang/en/auth.php file.
  • Only Administrators can manage users
  • A logged user cannot remove your own user

Enjoy.

About

Start Point to backend Rest API system builded with PHP and Laravel Framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages