shabxs
Validating Signed Route Requests
When I create a signed route which expires in 5 minutes and the url has form to submit but once the users clicks the link and stays longer than 5 mins, even when the url is expired, the user is able to make a post request..
7 replies
Validating Signed Route Requests
Thanks. I have done that on get route... Working perfectly.
My doubt is how do validate incoming request.
As in Laravel docs
use Illuminate\Http\Request;
Route::get('/unsubscribe/{user}', function (Request $request) {
if (! $request->hasValidSignature()) {
abort(401);
}
// ...
})->name('unsubscribe');
As in livewire form submission is not usual laravel post request
7 replies
Testing Infolists headerAction
return $infolist
->schema([
Section::make('DETAILS AND STATUS')
->headerActions(
[
Action::make('updateStatus')
->fillForm(fn (Program $record): array => [
'ProgramStatus' => $record->status,
])
->form([
Select::make('ProgramStats')
->label('Program Status')
->options(fn() => ProgramStatus::class)
->required(),
])
->action(function (array $data, Program $record): void {
$record->status = $data['ProgramStatus'] ;
$record->save();
}),
8 replies