Skip to content

This is a simple project in laravel for creating Restfull api

Notifications You must be signed in to change notification settings

santoshnet/laravel-api

Repository files navigation

Build Status Total Downloads Latest Stable Version License

About Laravel-api

Table of Contents

Installation

  1. Clone repository
$ git clone https://github.com/santoshnet/laravel-api.git
  1. Enter folder
$ cd laravel-api
  1. Install composer dependencies
~/laravel-api$ composer install
  1. Generate APP_KEY
~/laravel-api$ php artisan key:generate
  1. Configure .env file, edit file with next command $ nano .env
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=database
DB_USERNAME=user
DB_PASSWORD=secret

MAIL_DRIVER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=587 MAIL_USERNAME=[email protected] MAIL_PASSWORD=secret MAIL_ENCRYPTION=TLS

  1. Run migrations
~/laravel-api$ php artisan migrate
  1. Create client
~/laravel-api$ php artisan passport:install

Routes

Apientication
  • POST /Api/login
  • GET /Api/logout
  • POST /Api/register
  • GET /Api/register/activate/{token}
  • GET /Api/user_details
Password Reset
  • POST /password/create
  • GET /password/find/{token}
  • POST /password/reset
Blog Api
  • POST /blog/
  • GET /blogs/
  • POST /blogs/{id}
  • GET /blogs/{id}
  • DELETE /blogs/{id}
Screenshot

License

The Laravel framework is open-source software licensed under the MIT license.