Call to undefined method #1892
Unanswered
ByounghoPark
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to use Livewire PowerGrid in my Laravel application and followed these steps:
import './bootstrap';
import './../../vendor/power-components/livewire-powergrid/dist/powergrid';
After completing the setup, I attempted to create a PowerGrid table using:
php artisan powergrid:create
But when selecting the model, I immediately encountered this error:
Call to undefined method App\Models\Farmer::App\Models\User()
Model Definitions
App\Models\Farmer
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Farmer extends Model
{
use HasFactory;
}
App\Models\User
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class User extends Authenticatable
{
use HasFactory, Notifiable;
}
How can I fix this issue and successfully create a PowerGrid table?
Beta Was this translation helpful? Give feedback.
All reactions