Call to undefined method App\Models\User::follow()

Created at 26-Aug-2021 , By samar

Call to undefined method AppModelsUser::follow()

We’ll attempt to use programming in this lesson to solve the "Call to undefined method AppModelsUser::follow()" puzzle.

If you get an error call to undefined method App\Models\User::follow() in Overtrue\LaravelFollow\ laravel package then you must import the followable trait in your user model. Because you call the follow method without importing the followable trait in your laravel project.
  • Import Overtrue\LaravelFollow\Followable trait in user model in laravel

    --PATH app\Models\User.php
    use Overtrue\LaravelFollow\Followable;
    
    class User extends Authenticatable
    {
        use Followable;
    

Back to code snippet queries related laravel

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Buy Me A Coffee

Don't forget to share this article! Help us spread the word by clicking the share button below.

We appreciate your support and are committed to providing you valuable and informative content.

We are thankful for your never ending support.