[Solved] Call to undefined method App\Models\User::createToken()

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

How To Make Multi Auth In Laravel 8 [With full Source Code]

How To Make Multi Auth In Laravel 8

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

Submit Laravel Form Using Ajax Post Method with Validation

laravel ajax form by post method

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