From 845030ffad6ddf1ff713459e89b08b33e40859d2 Mon Sep 17 00:00:00 2001 From: Dedan Date: Wed, 4 Sep 2024 12:44:50 +0300 Subject: [PATCH] Changes to files: app/Filament/Resources/ExpenseResource.php app/Filament/Resources/ItemRateResource.php app/Filament/Resources/ItemResource.php app/Providers/ExpenseServiceProvider.php database/migrations/2024_09_03_133030_add_deleted_at_to_expense_expense_table.php database/migrations/2024_09_03_133039_add_deleted_at_to_expense_item_table.php database/migrations/2024_09_03_133046_add_deleted_at_to_expense_item_rate_table.php --- app/Filament/Resources/ExpenseResource.php | 10 ++++++---- app/Filament/Resources/ItemRateResource.php | 9 ++++++--- app/Filament/Resources/ItemResource.php | 9 ++++++--- app/Providers/ExpenseServiceProvider.php | 2 +- ..._133030_add_deleted_at_to_expense_expense_table.php | 4 ++-- ..._03_133039_add_deleted_at_to_expense_item_table.php | 4 ++-- ...33046_add_deleted_at_to_expense_item_rate_table.php | 4 ++-- 7 files changed, 25 insertions(+), 17 deletions(-) diff --git a/app/Filament/Resources/ExpenseResource.php b/app/Filament/Resources/ExpenseResource.php index 8e7be16..174778d 100644 --- a/app/Filament/Resources/ExpenseResource.php +++ b/app/Filament/Resources/ExpenseResource.php @@ -2,21 +2,23 @@ namespace Modules\Expense\Filament\Resources; -use Modules\Expense\Filament\Resources\ExpenseResource\Pages; -use Modules\Expense\Filament\Resources\ExpenseResource\RelationManagers; -use Modules\Expense\Models\Expense; -use Filament\Forms; use Filament\Forms\Form; use Filament\Resources\Resource; use Filament\Tables; use Filament\Tables\Table; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\SoftDeletingScope; +use Modules\Expense\Filament\Resources\ExpenseResource\Pages; +use Modules\Expense\Models\Expense; class ExpenseResource extends Resource { protected static ?string $model = Expense::class; + protected static ?string $slug = 'expense/expense'; + + protected static ?string $navigationGroup = 'Expense'; + protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack'; public static function form(Form $form): Form diff --git a/app/Filament/Resources/ItemRateResource.php b/app/Filament/Resources/ItemRateResource.php index e167d3b..c882264 100644 --- a/app/Filament/Resources/ItemRateResource.php +++ b/app/Filament/Resources/ItemRateResource.php @@ -2,9 +2,6 @@ namespace Modules\Expense\Filament\Resources; -use Modules\Expense\Filament\Resources\ItemRateResource\Pages; -use Modules\Expense\Filament\Resources\ItemRateResource\RelationManagers; -use Modules\Expense\Models\ItemRate; use Filament\Forms; use Filament\Forms\Form; use Filament\Resources\Resource; @@ -12,11 +9,17 @@ use Filament\Tables\Table; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\SoftDeletingScope; +use Modules\Expense\Filament\Resources\ItemRateResource\Pages; +use Modules\Expense\Models\ItemRate; class ItemRateResource extends Resource { protected static ?string $model = ItemRate::class; + protected static ?string $slug = 'expense/item/rate'; + + protected static ?string $navigationGroup = 'Expense'; + protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack'; public static function form(Form $form): Form diff --git a/app/Filament/Resources/ItemResource.php b/app/Filament/Resources/ItemResource.php index fdc025a..4c18907 100644 --- a/app/Filament/Resources/ItemResource.php +++ b/app/Filament/Resources/ItemResource.php @@ -2,9 +2,6 @@ namespace Modules\Expense\Filament\Resources; -use Modules\Expense\Filament\Resources\ItemResource\Pages; -use Modules\Expense\Filament\Resources\ItemResource\RelationManagers; -use Modules\Expense\Models\Item; use Filament\Forms; use Filament\Forms\Form; use Filament\Resources\Resource; @@ -12,11 +9,17 @@ use Filament\Tables\Table; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\SoftDeletingScope; +use Modules\Expense\Filament\Resources\ItemResource\Pages; +use Modules\Expense\Models\Item; class ItemResource extends Resource { protected static ?string $model = Item::class; + protected static ?string $slug = 'expense/item'; + + protected static ?string $navigationGroup = 'Expense'; + protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack'; public static function form(Form $form): Form diff --git a/app/Providers/ExpenseServiceProvider.php b/app/Providers/ExpenseServiceProvider.php index 0800f1e..a47a10e 100644 --- a/app/Providers/ExpenseServiceProvider.php +++ b/app/Providers/ExpenseServiceProvider.php @@ -9,7 +9,7 @@ class ExpenseServiceProvider extends ServiceProvider { protected string $moduleName = 'Expense'; - protected string $moduleNameLower = 'Expense'; + protected string $moduleNameLower = 'expense'; /** * Boot the application events. diff --git a/database/migrations/2024_09_03_133030_add_deleted_at_to_expense_expense_table.php b/database/migrations/2024_09_03_133030_add_deleted_at_to_expense_expense_table.php index 53cc5f2..66cf91c 100644 --- a/database/migrations/2024_09_03_133030_add_deleted_at_to_expense_expense_table.php +++ b/database/migrations/2024_09_03_133030_add_deleted_at_to_expense_expense_table.php @@ -22,7 +22,7 @@ public function up(): void public function down(): void { Schema::table('expense_expense', function (Blueprint $table) { - $table->dropColumn('deleted_at'); + $table->dropColumn('deleted_at'); }); } - } +}; diff --git a/database/migrations/2024_09_03_133039_add_deleted_at_to_expense_item_table.php b/database/migrations/2024_09_03_133039_add_deleted_at_to_expense_item_table.php index 0619f8e..4bf438c 100644 --- a/database/migrations/2024_09_03_133039_add_deleted_at_to_expense_item_table.php +++ b/database/migrations/2024_09_03_133039_add_deleted_at_to_expense_item_table.php @@ -22,7 +22,7 @@ public function up(): void public function down(): void { Schema::table('expense_item', function (Blueprint $table) { - $table->dropColumn('deleted_at'); + $table->dropColumn('deleted_at'); }); } - } \ No newline at end of file +}; diff --git a/database/migrations/2024_09_03_133046_add_deleted_at_to_expense_item_rate_table.php b/database/migrations/2024_09_03_133046_add_deleted_at_to_expense_item_rate_table.php index 5c826b4..59f5fb7 100644 --- a/database/migrations/2024_09_03_133046_add_deleted_at_to_expense_item_rate_table.php +++ b/database/migrations/2024_09_03_133046_add_deleted_at_to_expense_item_rate_table.php @@ -22,7 +22,7 @@ public function up(): void public function down(): void { Schema::table('expense_item_rate', function (Blueprint $table) { - $table->dropColumn('deleted_at'); + $table->dropColumn('deleted_at'); }); } - } +};