Merge branch 'develop' into main

This commit is contained in:
Dan Harrin
2021-08-15 09:28:36 +01:00
2 changed files with 11 additions and 1 deletions
+5
View File
@@ -12,6 +12,11 @@ class Page extends \Filament\Pages\Page
public static $resource;
public static function generateUrl($parameters = [], $absolute = true)
{
return route(static::getResource()::getRouteNamePrefix() . '.' . static::getResource()::getSlug() . '.' . static::route()->name, $parameters, $absolute);
}
public static function getModel()
{
return static::getResource()::getModel();
+6 -1
View File
@@ -39,7 +39,7 @@ class Resource
$name = static::router()->getIndexRoute()->name;
}
return route(static::$routeNamePrefix . '.' . static::getSlug() . '.' . $name, $parameters, $absolute);
return route(static::getRouteNamePrefix() . '.' . static::getSlug() . '.' . $name, $parameters, $absolute);
}
public static function getIcon()
@@ -88,6 +88,11 @@ class Resource
return (string) Str::plural(static::getLabel());
}
public static function getRouteNamePrefix()
{
return static::$routeNamePrefix;
}
public static function getSlug()
{
if (static::$slug) {