Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

LaraBug/larabug-app

218 stars
3 code files
View LaraBug/larabug-app on GitHub

app/Utilities/helpers.php

Open in GitHub
function 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
}

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.