php

embluk

·

Laravel Requests

·

PHP

·

Total Size: 824 B

·

·

Created: 8 months ago

·

Edited: 8 months 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

216 views

Are you sure you want to delete?