Skip to content

Instantly share code, notes, and snippets.

@ifirmawan
Created June 4, 2018 02:30
Show Gist options
  • Save ifirmawan/4dde8ba795634db429589e90a90222a4 to your computer and use it in GitHub Desktop.
Save ifirmawan/4dde8ba795634db429589e90a90222a4 to your computer and use it in GitHub Desktop.
Get current route
<?php
$route = Route::getCurrentRoute();
$route->prefix; //ex: api/
$route->action['as']; //ex : api.items.index
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment