F
Filament4mo ago
Reki

Discovering the Firefly FBlog (Blog Resources) to API Service by rupadana

What I am trying to do: I want to make an api routes for Firefly FBlog (this is gonna be consumed by my frontend, next js 14). I created new Filament UserResource (php artisan make:filament-resource) and run php artisan make:filament-api-service. This is working perfectly fine. But when i tried php artisan make:filament-api-service for BlogResource and change the resource like this use Firefly\FilamentBlog\Resources\PostResource as BlogResource; in BlogApiService.php and the Handlers :
public static function handlers(): array
{
return [
Handlers\CreateHandler::class,
Handlers\UpdateHandler::class,
Handlers\DeleteHandler::class,
Handlers\PaginationHandler::class,
Handlers\DetailHandler::class
];
}
public static function handlers(): array
{
return [
Handlers\CreateHandler::class,
Handlers\UpdateHandler::class,
Handlers\DeleteHandler::class,
Handlers\PaginationHandler::class,
Handlers\DetailHandler::class
];
}
php artisan route:list not showing the api routes for the blog, it only shows api routes for user. If i do php artisan make:filament-resource for new BlogResource, it's working (php artisan route:list shows the api routes for blog, i did using postman to fetch that blog api routes too and it shows correct data)
2 Replies
Dennis Koch
Dennis Koch4mo ago
Maybe ask here: #rupadana-api-service
Reki
RekiOP4mo ago
Alright thank you sir
Want results from more Discord servers?
Add your server