|
@@ -462,7 +462,7 @@ class GenController {
|
|
$text = str_replace("_LAYOUT_", "{$controller->root}.{$controller->parentControllerName}.view", $text);
|
|
$text = str_replace("_LAYOUT_", "{$controller->root}.{$controller->parentControllerName}.view", $text);
|
|
$text = str_replace("_NAME_", $this->camelToTitleCase($this->snakeToTitleCase($method->name)), $text);
|
|
$text = str_replace("_NAME_", $this->camelToTitleCase($this->snakeToTitleCase($method->name)), $text);
|
|
|
|
|
|
- if(count($method->data) > 1 && $method->data[1] === 'add_new') {
|
|
|
|
|
|
+ if(count($method->data) > 1 && strpos($method->data[1], 'add_new') === 0) {
|
|
$addLink = '<a class="btn btn-primary btn-sm" ' .
|
|
$addLink = '<a class="btn btn-primary btn-sm" ' .
|
|
'href="{{route(\'' . $method->childAddRoute . '\', [\'uid\' => $record->uid])}}">' .
|
|
'href="{{route(\'' . $method->childAddRoute . '\', [\'uid\' => $record->uid])}}">' .
|
|
"<i class='fa fa-plus-circle' aria-hidden='true'></i> Add New</a>";
|
|
"<i class='fa fa-plus-circle' aria-hidden='true'></i> Add New</a>";
|