commit
f9bb67fe4b
|
|
@ -286,7 +286,7 @@ abstract class DataGrid
|
|||
$this->checkPermissions($action, $specialPermission, function ($action, $eventName) {
|
||||
$this->fireEvent('action.before.' . $eventName);
|
||||
|
||||
$action['key'] = Str::slug($action['title'], '_');
|
||||
$action['key'] = Str::slug($action['title'], '_', app()->getLocale());
|
||||
|
||||
$this->actions[] = $action;
|
||||
$this->enableAction = true;
|
||||
|
|
|
|||
|
|
@ -275,6 +275,7 @@ trait ProvideCollection
|
|||
|
||||
if ($toDisplay) {
|
||||
$urlKey = $this->generateKeyFromActionTitle($action['title'], '_url');
|
||||
|
||||
$record->$urlKey = route($action['route'], $record->{$action['index'] ?? $this->index});
|
||||
}
|
||||
}
|
||||
|
|
@ -306,7 +307,7 @@ trait ProvideCollection
|
|||
*/
|
||||
private function generateKeyFromActionTitle($title, $suffix)
|
||||
{
|
||||
$validatedStrings = Str::slug($title, '_');
|
||||
$validatedStrings = Str::slug($title, '_', app()->getLocale());
|
||||
|
||||
return strtolower($validatedStrings) . $suffix;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue