From 563348d1b7a30bb83db7ada3e52cc12c3a51bb62 Mon Sep 17 00:00:00 2001 From: Rafael Blum Date: Sat, 20 Jul 2024 08:17:07 -0300 Subject: [PATCH] feat: add url amigavel slug resources --- app/Filament/Resources/CustomerResource.php | 2 ++ app/Filament/Resources/OrderResource.php | 2 ++ app/Filament/Resources/ProductResource.php | 2 ++ app/Filament/Resources/ProductTransactionResource.php | 2 ++ app/Filament/Resources/UserResource.php | 2 ++ 5 files changed, 10 insertions(+) diff --git a/app/Filament/Resources/CustomerResource.php b/app/Filament/Resources/CustomerResource.php index 1a7b0a3..f14c6c2 100644 --- a/app/Filament/Resources/CustomerResource.php +++ b/app/Filament/Resources/CustomerResource.php @@ -23,6 +23,8 @@ class CustomerResource extends Resource protected static ?string $navigationIcon = 'heroicon-o-wallet'; + protected static ?string $slug = 'clientes'; + protected static ?string $modelLabel = 'Cliente'; protected static ?string $recordTitleAttribute = 'name'; diff --git a/app/Filament/Resources/OrderResource.php b/app/Filament/Resources/OrderResource.php index b6f96ea..193d300 100644 --- a/app/Filament/Resources/OrderResource.php +++ b/app/Filament/Resources/OrderResource.php @@ -45,6 +45,8 @@ class OrderResource extends Resource protected static ?string $activeNavigationIcon = 'heroicon-o-shopping-cart'; + protected static ?string $slug = 'pedidos'; + protected static ?string $modelLabel = 'Venda'; protected static ?string $pluralModelLabel = 'Vendas'; diff --git a/app/Filament/Resources/ProductResource.php b/app/Filament/Resources/ProductResource.php index ebfc1ac..ee755c6 100644 --- a/app/Filament/Resources/ProductResource.php +++ b/app/Filament/Resources/ProductResource.php @@ -23,6 +23,8 @@ class ProductResource extends Resource protected static ?string $activeNavigationIcon = 'heroicon-o-shopping-cart'; + protected static ?string $slug = 'produtos'; + protected static ?string $modelLabel = 'Produto'; protected static ?string $pluralModelLabel = 'Produtos'; diff --git a/app/Filament/Resources/ProductTransactionResource.php b/app/Filament/Resources/ProductTransactionResource.php index 820431b..b923ecb 100644 --- a/app/Filament/Resources/ProductTransactionResource.php +++ b/app/Filament/Resources/ProductTransactionResource.php @@ -23,6 +23,8 @@ class ProductTransactionResource extends Resource protected static ?string $activeNavigationIcon = 'heroicon-o-shopping-cart'; + protected static ?string $slug = 'movimentacoes'; + protected static ?string $modelLabel = 'Movimentação'; protected static ?string $pluralModelLabel = 'Movimentações'; diff --git a/app/Filament/Resources/UserResource.php b/app/Filament/Resources/UserResource.php index 69a5c9a..6e0f707 100644 --- a/app/Filament/Resources/UserResource.php +++ b/app/Filament/Resources/UserResource.php @@ -26,6 +26,8 @@ class UserResource extends Resource protected static ?string $activeNavigationIcon = 'heroicon-o-user'; + protected static ?string $slug = 'usuarios'; + protected static ?string $modelLabel = 'Usuário'; protected static ?string $pluralModelLabel = 'Usuários';