numaxlab / cinema-catalog
dev-main
2024-11-19 13:07 UTC
Requires
- php: ^8.2
- backpack/crud: ^6.4
- backpack/filemanager: ^3.0
- cviebrock/eloquent-sluggable: ^11.0
- spatie/laravel-translatable: ^6.6
This package is auto-updated.
Last update: 2024-11-19 13:07:12 UTC
README
Instalación do paquete
composer require numaxlab/cinema-catalog
Arquivo de configuración
- cinema-catalog.php
Sobreescribir no paquete
Sobreescribir un modelo
-
Crear modelo
-
Extender do modelo pai do paquete
-
Crear o controlador:
public function __construct(array $attributes = []) { parent::__construct($attributes); }
-
Para engadir columnas ao $fillable:
$this->mergeFillable(['labs', 'gender', 'archive']);
-
Para engadir columnas ao $casts
$this->mergeCasts(['labs']);
-
Para engadir columnas ao $translatable -> Copiar e engadir o atributo
Sobreescribir un controlador do CRUD
- Crear controlador
- Extender do controlador pai do paquete
- Sobreescribir método e engadir:
parent::setupCreateOperation()
- Sobreescribir ruta no custom.php do proxecto
- No AppServiceProvider:
$this->app->bind(CinemaCatalogProjectCrudController::class, ProjectCrudController::class);