++ fix campagna
This commit is contained in:
@@ -14,6 +14,9 @@ class CampagnaEdit extends Component
|
||||
|
||||
public function mount(Campagna $campagna)
|
||||
{
|
||||
// Modifica campagne riservata all'amministratore.
|
||||
$this->authorize('settings.manage');
|
||||
|
||||
$this->campagna = $campagna;
|
||||
$this->descrizione = $campagna->descrizione;
|
||||
$this->start_date = $campagna->start_date->format('Y-m-d');
|
||||
@@ -31,6 +34,10 @@ class CampagnaEdit extends Component
|
||||
|
||||
public function save()
|
||||
{
|
||||
// Re-check on the update request: route middleware guards the initial
|
||||
// load, but the action can be replayed on a persisted component.
|
||||
$this->authorize('settings.manage');
|
||||
|
||||
$this->validate();
|
||||
|
||||
$this->campagna->update([
|
||||
|
||||
Reference in New Issue
Block a user