In this blog post, we learn how to change messages from unauthorized API calls in Laravel 8. You should overwrite the method unauthenticated in your middleware/Authenticate.php file middleware/Authenticate.php I hope it will help you.
Today’s topic is Laravel 8 REST API with Passport Authentication Tutorial. Laravel REST API is required when you are working for a mobile application or any frontend framework such as react js and Vue JS. In this post, we learn how to make authentication API in Laravel 8. If you are new to Laravel or … Read more
Normally “Call to undefined method App\Models\User::createToken()” error comes during working on Passport API authentication. So in this blog post, we solve this issue in simple two-line. just flow me. App\Models\User.php Add method createToken is in HasApiTokens trait, you should use it In your User Model. At the above code, I added two line and I … Read more
In this blog post, we learn How To Make Multi Auth In Laravel 8. We know laravel gives us a default auth for users but in some cases, we need another auth for admin or seller. So first here I am using a fresh laravel 8 application so first, install a laravel application and generate … Read more
In this post, we learn how to submit a form by the Ajax post method in laravel. Ajax is great to submit forms or get data from the database without reloading or refresh the page. We also validation our data in the Laravel controller and show an error message in your blade file. Step 1: … Read more