-
app/Utilities/helpers.php
Open in GitHubfunction canonical_url() { if (!$route = Route::current()) { return false; } if (!$action = $route->getAction()) { return false; } if (!array_has($action, 'uses') || $action['uses'] instanceof Closure) { return false; } if (!$uses = $action['uses']) { return false; } return action($uses, $route->parameters() ?? []); }
-
resources/views/frontend/partials/meta.blade.php
Open in GitHub<link rel="canonical" href="{{ canonical_url() }}" />
-
composer.json
Open in GitHub{ "require": { "php": "^8.0", "calebporzio/sushi": "^2.1", "coconutcraig/laravel-postmark": "^2.9", // ... }, "autoload": { "files": [ "app/Utilities/helpers.php" ], } // ... other settings }