
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.phpuse Overtrue\LaravelFollow\Followable; class User extends Authenticatable { use Followable;
0
Random Code Snippet Queries: Laravel
- Class 'Facade\Ignition\IgnitionServiceProvider' not found
- Laravel create multiple records in Pivot table
- How to get all route list
- How to include header file in laravel
- Print query in laravel
- Create record with unique slug in laravel
- Laravel get count with where condition
- Ajax POST request in laravel
- Insert current date time in a column using Laravel
- How to disable timestamps in laravel
- How to increment column value of table in Laravel
- How to add class to tr in table using foreach in laravel
- How to add a key value pair to existing array in laravel
- Laravel file size validation not working
- How to decrypt laravel password
- Laravel 5.4 save data to database
- How to return a column with different name in Laravel
- Method Illuminate\Http\Request::validated does not exist
- Remove array keys and values if it does not exist in other array in Laravel
- If condition in foreach loop in laravel
- Post model with title and body in laravel 8
- How to display user profile after login in laravel
- SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'posts_user_id_foreign'; check that column/key exists
- Json encode method in laravel
- How to get last month records in Laravel