
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.phpuse Overtrue\LaravelFollow\Followable; class User extends Authenticatable { use Followable;
If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.
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.
Random Code Snippet Queries: Laravel
- Retain selected value of select box in Laravel
- Store logged in user details in session and display in view in laravel
- Drop foreign key column in Laravel using migration
- How to restore deleted records in laravel
- Remove several global scope from query
- SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'user_id'
- Laravel order by date not working
- Get ids in array from users table
- SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'posts_user_id_foreign'; check that column/key exists
- Get latest record by created at in Laravel
- The use statement with non-compound name 'DB' has no effect
- Ajax POST request in laravel
- Redirect to previous page or url in laravel
- How to create new user without form submission in laravel
- Undefined property: stdClass::$title
- How to get route method name in Laravel
- Laravel append URI in route
- Laravel 5.4 save data to database
- Use withCount() to get total number of records with relationship
- Method Illuminate\Database\Eloquent\Collection::lists does not exist
- External link not working in laravel blade
- How to get all route list
- How to get selected categories on edit record with Select2
- Import/Use Storage facade in laravel
- Laravel get single row by id