- Abstrakte SettingCrudController-Basis für die kleinen Stammdaten-CRUDs - TaxRate/DeliveryTime/DisposalReason/MaterialQuality/Location/SupplierCategory/PackagingMaterial auf ~25-Zeilen-Konfiguration reduziert - Identische Update*Request-Klassen entfernt (Update nutzt Store-Request, via updateRequestClass() überschreibbar) - Bilanz -441/+73 Zeilen; Grundlage für die Lagerort-CRUDs in AP-21 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
39 lines
782 B
PHP
39 lines
782 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Admin\Inventory;
|
|
|
|
use App\Http\Requests\Inventory\StoreLocationRequest;
|
|
use App\Models\Location;
|
|
|
|
class LocationController extends SettingCrudController
|
|
{
|
|
protected function modelClass(): string
|
|
{
|
|
return Location::class;
|
|
}
|
|
|
|
protected function viewPrefix(): string
|
|
{
|
|
return 'admin.inventory.locations';
|
|
}
|
|
|
|
protected function redirectRoute(): string
|
|
{
|
|
return 'admin.inventory.locations.index';
|
|
}
|
|
|
|
protected function storeRequestClass(): string
|
|
{
|
|
return StoreLocationRequest::class;
|
|
}
|
|
|
|
protected function newModelAttributes(): array
|
|
{
|
|
return ['active' => true];
|
|
}
|
|
|
|
protected function indexOrder(): array
|
|
{
|
|
return ['name'];
|
|
}
|
|
}
|