Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/Nova/GirlsInDigitalFaqItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,13 @@ public static function authorizedToCreate(Request $request): bool
return true;
}

/** Must be instance method to match Laravel\Nova\Resource::authorizedToUpdate (non-static). */
public function authorizedToUpdate(Request $request): bool
{
return true;
}

/** Must be instance method to match Laravel\Nova\Resource::authorizedToDelete (non-static). */
public function authorizedToDelete(Request $request): bool
{
return true;
Expand Down
10 changes: 5 additions & 5 deletions app/Nova/GirlsInDigitalPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -345,16 +345,16 @@ private function getButtonField(string $key, string $field)
private function fillButtonField(\App\GirlsInDigitalPage $model, string $key, string $field, $value): void
{
try {
if (! isset($model->_button_updates)) {
$model->_button_updates = [];
if (! isset($model->nonPersistedButtonUpdates)) {
$model->nonPersistedButtonUpdates = [];
}
if (! isset($model->_button_updates[$key])) {
$model->_button_updates[$key] = [];
if (! isset($model->nonPersistedButtonUpdates[$key])) {
$model->nonPersistedButtonUpdates[$key] = [];
}
if ($field === 'enabled' || $field === 'open_new_tab') {
$value = (bool) $value;
}
$model->_button_updates[$key][$field] = $value;
$model->nonPersistedButtonUpdates[$key][$field] = $value;
} catch (\Throwable $e) {
\Illuminate\Support\Facades\Log::error('GirlsInDigital button field fill failed: ' . $key . '.' . $field, [
'exception' => $e->getMessage(),
Expand Down