Blogold is Articles CRUD REST API that demonstrate using JWT with Laravel as task of employment at (Matrix):
- Install composer dependances
- Generate JWT secret
php artisan jwt:secret
- Setup your database and run migrations
php artisan migrate
- Run tinker command and create new user to login with :
$ php artisan tinker
>>> App\Models\User::factory(1)->create()
=> Illuminate\Database\Eloquent\Collection {#4249
all: [
App\Models\User {#4254
name: "Frederick Beatty Sr.",
email: "enitzsche@example.com",
phone: "+12256917031",
email_verified_at: "2020-10-27 00:53:54",
updated_at: "2020-10-27 00:53:54",
created_at: "2020-10-27 00:53:54",
id: 2,
},
],
}
>>>
-
Seed your database with dummy data to play with
php artisan db:seed
-
Setup a virtual host or serve your application using
php artisan serve
-
Open API Docs to try your application.
The Laravel framework is open-sourced software licensed under the MIT license.