2017 © Pedro Peláez
 

sdk laravel-bootcamp

A boot camp who initialize a series of tools for starter of laravel 5.5

image

jetwaves/laravel-bootcamp

A boot camp who initialize a series of tools for starter of laravel 5.5

  • Saturday, April 7, 2018
  • by jetwaves
  • Repository
  • 1 Watchers
  • 1 Stars
  • 39 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 8 % Grown

The README.md

laravel-bootcamp

A boot camp who initialize a series of tools for starter of laravel 5.5, (*1)

  1. Installation:, (*2)

    • Run command:
    composer require jetwaves/laravel-bootcamp
    
    • Edit config/app.php, add following line into 'providers' array
    Jetwaves\LaravelBootcamp\Providers\LaravelBootcampServiceProvider::class,
    
    • Edit '.env', set your database options (database name, username, password)
  2. Jwt (Json Web Token ) Integration., (*3)

    1. Initialisation, (*4)

      Run command in console: php php artisan bootcamp:init, (*5)

    2. Test it's working:
      • Run php artisan serve in cli.
      • Import "Tests/postman/Laravel_Jwt_integration_Test.postman_collection.json" into Postman
      • Run the tests 1-9. You should see following results:
        1. test1: php it works !!!
        2. test2: php "error": "Token is required"
        3. test3: php The name field is required.,The email field is required.,The password field is required.
        4. test4: php { "status": true, "message": "JwtUser created successfully", "data": { "name": "test1", "email": "test@test.com1", "updated_at": "2018-02-17 12:12:36", "created_at": "2018-02-17 12:12:36", "id": 2 } }
        5. test5: php The email field is required.,The password field is required.
        6. test6: php "invalid_email_or_password"
        7. test7: php "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.***********************"
        8. test8: (change the 'Authorization' field of the header with 'Bearer '.$tokenReturnedInTest7 ) php it works !!!
        9. test9: (change the 'Authorization' field of the header with 'Bearer '.$tokenReturnedInTest7 ) php "result": { "id": 1, "name": "test1", "email": "test@test.com1", "created_at": "2018-02-17 11:57:01", "updated_at": "2018-02-17 11:57:01" }
    3. Usage:, (*6)

      A simple implicit router protected with jwt is declared in routes/api.php, (*7)

      Routes without jwt protection:, (*8)

      GET http://localhost:8000/api/noauth/ControllerName/snake-form-function-name is served by ControllerNameController->getSnakeFormFunctionName()
      POST http://localhost:8000/api/noauth/ControllerName/snake-form-function-name is served by ControllerNameController->postSnakeFormFunctionName()

      Routes with jwt protection:, (*9)

      GET http://localhost:8000/api/withauth/ControllerName/snake-form-function-name is served by ControllerNameController->getSnakeFormFunctionName()
      POST http://localhost:8000/api/withauth/ControllerName/snake-form-function-name is served by ControllerNameController->postSnakeFormFunctionName()                

      Cf. Jetwaves/ Laravel Implicit Router to know more about implicit router for laravel 5.2+, (*10)

    4. Errors and eventual problems:, (*11)

      1. To be completed later.

The Versions

07/04 2018

dev-master

9999999-dev

A boot camp who initialize a series of tools for starter of laravel 5.5

  Sources   Download

MIT

The Requires

 

by Avatar jetwaves

laravel api authentication jwt token

17/02 2018

v1.0.1

1.0.1.0

A boot camp who initialize a series of tools for starter of laravel 5.5

  Sources   Download

MIT

The Requires

 

by Avatar jetwaves