F
Filament7mo ago
Adam T

Created a fork of Filament-Fabricator but it broke

Hey guys, this might be a bit of an odd ask, but I've been having some troubles debugging this issue. I've forked filament-fabricator, and mode a few modifications to get it working with a multi-tenancy plugin I installed. https://github.com/ajmt93/filament-fabricator I had made the changes inside my project and it was working, and then I copied the modifications to the new repo, tried to pull them all in, but I keep getting the exception: Target class [filament-fabricator] does not exist. Share of stacktrace( https://flareapp.io/share/VmeN1lzP ) When going through the stack trace there is an error in the PageResource:
public static function getModel(): string

{

return FilamentFabricator::getPageModel();

}
public static function getModel(): string

{

return FilamentFabricator::getPageModel();

}
In my composer.json file I also added this to get the autoload working:
"repositories": [
{
"type": "package",
"package": {
"name": "z3d0x/filament-fabricator",
"version": "2",
"source": {
"url": "https://github.com/ajmt93/filament-fabricator",
"type": "git",
"reference": "2.x"
}
}
}
],
...
"autoload": {
"psr-4": {
...
"Z3d0X\\FilamentFabricator\\": "vendor/z3d0x/filament-fabricator/src/"
}
},
"repositories": [
{
"type": "package",
"package": {
"name": "z3d0x/filament-fabricator",
"version": "2",
"source": {
"url": "https://github.com/ajmt93/filament-fabricator",
"type": "git",
"reference": "2.x"
}
}
}
],
...
"autoload": {
"psr-4": {
...
"Z3d0X\\FilamentFabricator\\": "vendor/z3d0x/filament-fabricator/src/"
}
},
I am hoping to get this working on my project and then eventually rewrite things to work with broader multi-tenancy options. Any help would be appreciated. I'll have to review any messages tomorrow as I am just about to sleep, but thank you!
GitHub
GitHub - ajmt93/filament-fabricator: Block-Based Page Builder Skele...
Block-Based Page Builder Skeleton for your Filament Apps - ajmt93/filament-fabricator
Flare
Target class [filament-fabricator] does not exist. - The error occurred at http://127.0.0.1/company/1
1 Reply
Adam T
Adam TOP7mo ago
So I think I've managed to narrow down the error to the package not being discovered in composer dump-autoload but it does install. I've never experienced this issue. I've tried to change the repository to use "vcs" for the type, but that didn't install properly either. Here is a chunk of the composer file in my main package:
"repositories": [
{
"type": "package",
"package": {
"name": "z3d0x/filament-fabricator",
"version": "2",
"source": {
"url": "https://github.com/ajmt93/filament-fabricator",
"type": "git",
"reference": "2.x"
}
}
}
],
"require": {
"php": "^8.2",
"andrewdwallo/filament-companies": "^4.0",
"filament/filament": "^3.2",
"laravel/framework": "^11.0",
"laravel/sanctum": "^4.0",
"laravel/tinker": "^2.9",
"pboivin/filament-peek": "^2.0",
"z3d0x/filament-fabricator": "2"
},
"require-dev": {
"fakerphp/faker": "^1.23",
"laravel/pint": "^1.13",
"laravel/sail": "^1.29",
"mockery/mockery": "^1.6",
"nunomaduro/collision": "^8.0",
"phpunit/phpunit": "^11.0.1",
"spatie/laravel-ignition": "^2.4"
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/",
"Z3d0X\\FilamentFabricator\\": "vendor/z3d0x/filament-fabricator/src/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
"repositories": [
{
"type": "package",
"package": {
"name": "z3d0x/filament-fabricator",
"version": "2",
"source": {
"url": "https://github.com/ajmt93/filament-fabricator",
"type": "git",
"reference": "2.x"
}
}
}
],
"require": {
"php": "^8.2",
"andrewdwallo/filament-companies": "^4.0",
"filament/filament": "^3.2",
"laravel/framework": "^11.0",
"laravel/sanctum": "^4.0",
"laravel/tinker": "^2.9",
"pboivin/filament-peek": "^2.0",
"z3d0x/filament-fabricator": "2"
},
"require-dev": {
"fakerphp/faker": "^1.23",
"laravel/pint": "^1.13",
"laravel/sail": "^1.29",
"mockery/mockery": "^1.6",
"nunomaduro/collision": "^8.0",
"phpunit/phpunit": "^11.0.1",
"spatie/laravel-ignition": "^2.4"
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/",
"Z3d0X\\FilamentFabricator\\": "vendor/z3d0x/filament-fabricator/src/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
Want results from more Discord servers?
Add your server