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
- Class 'Facade\Ignition\IgnitionServiceProvider' not found
- Get domain name in laravel
- Extra Filter Query on Relationships in Laravel
- How to send email in Laravel 11
- Laravel create table migration with model
- Retain selected value of select box in Laravel
- Class 'App\Http\Controllers\User' not found
- Laravel get single row by id
- SQLSTATE[42000]: Syntax error or access violation: 1075 Incorrect table definition; there can be only one auto column and it must be defined as a key
- How to get all route list
- How to check email is valid or not in Laravel
- Add [name] to fillable property to allow mass assignment on [App\Models\Project]
- The use statement with non-compound name 'Auth' has no effect
- How to upload files to amazon s3 bucket using Laravel
- How to use or operator in laravel
- How to use bootstrap pagination in laravel 8
- Save or update pivot table data with additional column in Laravel
- Laravel URL validation not working
- Import/Use Storage facade in laravel
- How to get last record from object collection in laravel
- Split an Eloquent Collection by half in Laravel
- Laravel recursive function in controller
- How to call Laravel route in jQuery
- How to get single column value in laravel
- Get 30 days older records from table in laravel