php
embluk
·
Laravel Requests
·
PHP
·
Total Size: 824 B
·
·
Created: 4 years ago
·
Edited: 4 years ago
<?php
Route::get('/foo/{id}', function (Request $request, $id) {
return $request->hasValidSignature() ? 'valid' : 'invalid';
})->name('foo');
URL::temporarySignedRoute('foo', now()->addMinutes(5), ['id' => 1]);
if ($request->filled('disk') || $request->filled('site')) {
// Statements here...
}
if ($request->filledAny(['disk', 'site'])) {
//
}
// Or
if ($request->filledAny('disk', 'site')) {
//
}
Laravel 5.6.12 shipped over the weekend with added support for signed routes and URLs along with quite a few other new additions.
Support for signed routes was added by Taylor Otwell, which provides a few new methods you can use to generate a signed route and a temporary signed route. For example, if you have a named route foo
, you can generate a temporary URL.
1 bit
•
1491 views
Are you sure you want to delete?