Closed dangquanghai closed 4 years ago
in the instruction it says you need update the seeder: https://laravel.com/docs/master/seeding
If you have not used laravel before then you should learn about seeders. Check a tutorial on seeders in the link above. They go here. https://github.com/tuandm/laravue/tree/master/database/seeds
This more of basic laravel question. this should be resolved.
Hi @tuandm !
How can we testing the endpoint on POSTMAN using Laravel airlock(sanctum)? Because it is totally different from Bearer Token and Basic Authentication. Can you please elaborate if you have time please?
Or If you have any Pre-Request Script to test endpoint please share.
Hi @webtamizhan , I successfully did by following this tutorial. Laravel Sanctum (Airlock) with Postman
Pre-Request Script is
pm.sendRequest({
url: 'http://127.0.0.1:8000/api/sanctum/csrf-cookie',
method: 'GET'
}, function (error, response, { cookies }) {
if (!error) {
pm.environment.set('xsrf-token', cookies.get('XSRF-TOKEN'))
}
})
If you want to know more, feel free to open a new issue. The following are some references based on my project.
Hi @webtamizhan , I successfully did by following this tutorial. Laravel Sanctum (Airlock) with Postman
Pre-Request Script is
pm.sendRequest({ url: 'http://127.0.0.1:8000/api/sanctum/csrf-cookie', method: 'GET' }, function (error, response, { cookies }) { if (!error) { pm.environment.set('xsrf-token', cookies.get('XSRF-TOKEN')) } })
If you want to know more, feel free to open a new issue. The following are some references based on my project.
Thanks buddy, it works well!
Hi Man, I follow your instruction https://doc.laravue.dev/vi/guide/development/work-with-resource.html to use resource but I don't know ưhich file to write this the code bellow ?
Thanks.