API Authentication Module
Go to file
2023-05-29 04:21:02 +00:00
Config Initial Commit - API Authentication Module 2023-05-27 23:06:00 +07:00
Database Initial Commit - API Authentication Module 2023-05-27 23:06:00 +07:00
Entities Initial Commit - API Authentication Module 2023-05-27 23:06:00 +07:00
Http Initial Commit - API Authentication Module 2023-05-27 23:06:00 +07:00
Providers Initial Commit - API Authentication Module 2023-05-27 23:06:00 +07:00
Routes Initial Commit - API Authentication Module 2023-05-27 23:06:00 +07:00
composer.json Initial Commit - API Authentication Module 2023-05-27 23:06:00 +07:00
module.json Initial Commit - API Authentication Module 2023-05-27 23:06:00 +07:00
readme.md Add API Usage Example 2023-05-29 04:21:02 +00:00

Install a module package (for private packages)

To install a module package open composer.json

Add a repositories section :

"repositories": [
  {
      "name": "putrakuningan/auth-module",
      "type": "vcs",
      "url": "https://git.putrakuningan.com/putrakuningan/auth-module",
      "branches-path": "api"
  }
]

***branches-path according to what will be installed

And in the require section type:

"putrakuningan/auth-module": "^1.0"

Now you can run composer update to install the package.

Or you can install with :

composer require putrakuningan/auth-module:1.0.0

After add repositories

Setup Module

To activate the module type:

php artisan module:enable Auth

Now the module is ready to be migrated and seeded:

php artisan module:migrate Auth
php artisan module:seed Auth

Uninstall Packages

If you uninstall a package from composer.json the module WILL be removed from the modules directory.

List & API Usage Example

Don't forget to add Accept : application/json on header every API Request

Register

POST /api/register
{
  "name" : "Demo",
  "email" : "demo@demo.com",
  "password" : "demo"
  "passowrd_confirmation" : "demo"
}

Login

POST /api/login
{
  "email" : "demo@demo.com",
  "password" : "demo"
}