FilamentF
Filament15mo ago
6 replies
Patrick

Class "App\Models\Member" not found

Hey folks,

i tryed now so much. Fila Docs, Youtube (Code with D...), and so on. After Creating a fila-resource with
php artisan make:filament-resource Member

in app\Filament\Resources the folger "MemberResources" with its Pages Create, Edit, List ist created, also the MemberResource.php

In Browser, i can see the "Member" Link, but when i click on it it says
Undefined type 'App\Models\Member'

VS Code Extansion intelephense says, in Line 18 of MemberResource.php, there is an error at "protected static ?string $model = Member::class;" called "Undefined type 'App\Models\Member'.intelephense(P1009)"

i wanna learn filament with the doc and some youtube videos, but that error is - for me - unsolve able. yeah, i googled, but now after 1h i am still at the start of the error-solution.

Using: Laravel 11, Livewire 3.x, Filament 3.2 with the newest Panels
Whole project was created today.

BG Patrick
Solution
actually, you need a Model to create a Resource
https://laravel.com/docs/11.x/eloquent#generating-model-classes
Laravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.
Laravel - The PHP Framework For Web Artisans
Was this page helpful?