DATA BASE
Creación de datos
Migrations
database/migrations/2020_04_18_101530_create_authors_table.php
$ php artisan make:migration CreateAuthorsTable --create=authors
$ php artisan make:migration CreateBooksTable --create=books
$ php artisan migrate
Factory
Crear una factorya para crear Authors
database/factories/ModelFactory.php
Seeder
Generar automáticamente instancias
database/seeds/DatabaseSeeder.php
php artisan db:seed
Eliminar Datos
php artisan migrate:fresh --seed
CONTROLLER
Controler
app/Http/Controllers/AuthorController.php
Router
/routes/web.php
COMPOSER
composer clearcache composer dump-autoload
#OATUH 2
php artisan migrate
php artisan passport:install
/storage/oauth-private.key /storage/oauth-public.key
Encryption keys generated successfully. Personal access client created successfully. Client ID: 1 Client secret: Va0h4eOCCSl0Nq2HoSfRXxV9akFtYwZPdjRt1SPf Password grant client created successfully. Client ID: 2 Client secret: kWWbP2S0JeldTFChfXz71NOsOpi09xpgnO0LMfHz
php artisan passport:client
Client ID: 3 Client secret: EIR7jES5JdjqLzAubTIbZxWbp94pOr8YGIvTWpM2
{ "token_type": "Bearer", "expires_in": 31536000, "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImI4ZThjZWJiM2ExZTg4Nzg5MDhjYjEwMTZjY2I3ZDcwOTk5NzY0ZmJiZGVmMzVhNDRjNmJiMDQwZTE2M2FlNDM2YjdhODQzOWUwOWNlNzk5In0.eyJhdWQiOiIzIiwianRpIjoiYjhlOGNlYmIzYTFlODg3ODkwOGNiMTAxNmNjYjdkNzA5OTk3NjRmYmJkZWYzNWE0NGM2YmIwNDBlMTYzYWU0MzZiN2E4NDM5ZTA5Y2U3OTkiLCJpYXQiOjE1ODczMTQ1MjksIm5iZiI6MTU4NzMxNDUyOSwiZXhwIjoxNjE4ODUwNTI5LCJzdWIiOiIiLCJzY29wZXMiOltdfQ.veSl0xgdU78w8qlXr0y63UU61OGRW6cPwOLpWf4nvGttNAanXxMVpDyTSiKrJip2gvOZ2maHbnTjcLmu4FmcOfR1aL3sPyNXgRnqZfPuy3W3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