Package CreatePage seems to not working

Guys, question: I'm trying to create a plugin (https://github.com/fastofiCorp/filament-printables), and I'm facing a situation here with the following error. It happens when I try to write anything on the fields in the create form (which is correctly rendering). Anyone have an idea of what is happening?
10 Replies
Dan Harrin
Dan Harrin2y ago
how are you registering the resource?
Alvaro Leon
Alvaro LeonOP2y ago
Using the $resources array as
<?php

namespace FastofiCorp\FilamentPrintables;

use Closure;

use Filament\PluginServiceProvider;
use Spatie\LaravelPackageTools\Package;
use Spatie\LaravelPackageTools\Commands\InstallCommand;
use FastofiCorp\FilamentPrintables\Resources\FilamentPrintableResource;

class FilamentPrintablesServiceProvider extends PluginServiceProvider
{

protected array $resources = [
FilamentPrintableResource::class,
];
...
<?php

namespace FastofiCorp\FilamentPrintables;

use Closure;

use Filament\PluginServiceProvider;
use Spatie\LaravelPackageTools\Package;
use Spatie\LaravelPackageTools\Commands\InstallCommand;
use FastofiCorp\FilamentPrintables\Resources\FilamentPrintableResource;

class FilamentPrintablesServiceProvider extends PluginServiceProvider
{

protected array $resources = [
FilamentPrintableResource::class,
];
...
Dan Harrin
Dan Harrin2y ago
hmm can you run the livewire:discover artisan command also composer update in your project which has the package symlinked
Alvaro Leon
Alvaro LeonOP2y ago
Actually i'm using the package this way:
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/",
"FastofiCorp\\FilamentPrintables\\": "packages/fastofi-corp/filament-printables/src"

}
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/",
"FastofiCorp\\FilamentPrintables\\": "packages/fastofi-corp/filament-printables/src"

}
Dan Harrin
Dan Harrin2y ago
so where are you registering the service provider
Alvaro Leon
Alvaro LeonOP2y ago
In config/app.php
...
'providers' => [
\FastofiCorp\FilamentPrintables\FilamentPrintablesServiceProvider::class,
...
...
'providers' => [
\FastofiCorp\FilamentPrintables\FilamentPrintablesServiceProvider::class,
...
Dan Harrin
Dan Harrin2y ago
hm thats weird im honestly not sure then what else is in your service provider
Alvaro Leon
Alvaro LeonOP2y ago
I'm going to try something then I'll be back with results (that something is passing it into another fresh FilamentPHP install)
Dan Harrin
Dan Harrin2y ago
if youre overriding any methods on the service provider without calling parent::methodName(), they could be causing the problem
Alvaro Leon
Alvaro LeonOP2y ago
Well, you will think i'm a noob (sure I'm.) I just deleted everything and mounted it using spatie package skeleton, then It started to work properly.

Did you find this page helpful?