I'm creating an api for a mobile app in laravel version 5.2, but I don't have any idea how to return exception in JSON format. I've been doing api development and tested using chrome postman.
Please help me how can I start with laravel 5.2?
I can't understand how to set error response in laravel 5.2. I've already tried below plugin, but still didn't succeed:
How can we do authentication in laravel 5.2 from mobile app?
Something good references and video link so I can learn and development in laravel 5.2 very friendly.
Laravel provides a convenient way to create Restful APIs via resourceful controllers. Create a route for the resourceful controller in routes/api.
it's simple! just make your API's and then call them with both Vue (for web) and flutter(for mobile). you dont need to specify them for seprate usage!
Firstly, you'll need to build an API from your Laravel app to use it as a 'back end'. You won't be able to use your existing codebase to create the front end of your mobile apps, so you will have to rebuild the features and functionalities of your existing web app for the iOS and Android platforms.
For the creation of Restful API using Laravel 5.2 you could use below mention Laravel API generator Package .
https://github.com/InfyOmLabs/laravel-generator
As well as for the Authentication based on Token you could refer below mention Link.
https://gistlog.co/JacobBennett/090369fbab0b31130b51
One more additional thing if you have already created database / system and wants to use that for the creation of API using Laravel Generator package than use below mention command.
php artisan infyom:api_scaffold Packages --fromTable --tableName=packages
Hope this information will help you to create complete Restful API using Laravel 5.2
I am also creating a Web Based Application for Android using Laravel 5.2 and we are using Rest API for this process. We are using API Guard for the purpose of Authentication. It works Perfect for us. We are authenticating it for Android as well as AngularJS and works fine for us. https://github.com/chrisbjr/api-guard. A Clear Documentation is Provided here. Hope so you have got your doubt cleared using this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With