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

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.

Answers 1
  • 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;
    
    0
  • Back to code snippet queries related laravel