Routing
By default Shortify registers:
GET /s/{code} → shortify.url
URI and domain
// config/shortify.php
'routing' => [
'uri' => '/s/{code}',
'domain' => null, // e.g. 'go.example.com'
],
Use domain when short links should live on a dedicated host.
Middleware
'routing' => [
'middleware' => ['web'],
],
Redirect status
'routing' => [
'redirect_status' => 302,
],
Custom route
Set routing.route to a named route you control. Shortify will not register
its default route; you own the redirect entrypoint.
'routing' => [
'route' => 'links.show',
],
Route::get('/go/{code}', function (string $code) {
return \BradieTilley\Shortify\Models\ShortifyUrl::redirectTo($code);
})->name('links.show');
Generated $short->url values resolve through your named route.