F
Filamentβ€’17mo ago
Shaung Bhone

Package install locally

This is my first installed packages in my local app. Not from vendor I got this issues.
Access level to App\Filament\Resources\UserResource::getNavigationGroup() must be public (as in class Filament\Resources\Resource)
Access level to App\Filament\Resources\UserResource::getNavigationGroup() must be public (as in class Filament\Resources\Resource)
composer.json
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/",
"io3x1\\FilamentUser\\": "src"
}
},
"repositories": [
{
"type": "path",
"url": "./packages/3x1io/filament-user",
"options": {
"symlink": true
}
}
],
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/",
"io3x1\\FilamentUser\\": "src"
}
},
"repositories": [
{
"type": "path",
"url": "./packages/3x1io/filament-user",
"options": {
"symlink": true
}
}
],
Solution:
from protectd getNavigationGroup to public getNavigationGroup
Jump to solution
10 Replies
Shaung Bhone
Shaung BhoneOPβ€’17mo ago
publish the resource from doc
php artisan filament-user:publish
php artisan filament-user:publish
This is my UserResource.php
<?php

namespace App\Filament\Resources;
<?php

namespace App\Filament\Resources;
And this is not working though
<?php

namespace io3x1\FilamentUser\Resources;
<?php

namespace io3x1\FilamentUser\Resources;
Lara Zeus
Lara Zeusβ€’17mo ago
are you planing to make a PR to the package later? or you want to use it only in your app?
Shaung Bhone
Shaung BhoneOPβ€’17mo ago
Yes. both
Lara Zeus
Lara Zeusβ€’17mo ago
you dont need the "io3x1\FilamentUser\": "src" autoload if composer update worked without erros then you need to edit the methods only no need to change any namespace or anything
Solution
Lara Zeus
Lara Zeusβ€’17mo ago
from protectd getNavigationGroup to public getNavigationGroup
Shaung Bhone
Shaung BhoneOPβ€’17mo ago
aww. I didn't see that Thank you.
Lara Zeus
Lara Zeusβ€’17mo ago
glad to help πŸ™‚
Shaung Bhone
Shaung BhoneOPβ€’17mo ago
public not protected πŸ™‚
You told me but I didn't get it. πŸ˜‚
Lara Zeus
Lara Zeusβ€’17mo ago
yup πŸ˜‚
Shaung Bhone
Shaung BhoneOPβ€’17mo ago
I think all are public. πŸ˜‚ Need to sleep πŸ₯Ή Thank you
Want results from more Discord servers?
Add your server