Illuminate\Routing\Router::getLastGroupPrefix PHP Метод

getLastGroupPrefix() публичный Метод

Get the prefix from the last group on the stack.
public getLastGroupPrefix ( ) : string
Результат string
    public function getLastGroupPrefix()
    {
        if (!empty($this->groupStack)) {
            $last = end($this->groupStack);
            return isset($last['prefix']) ? $last['prefix'] : '';
        }
        return '';
    }

Usage Example

Пример #1
0
 /**
  * Get the resource name for a grouped resource.
  *
  * @param  string  $prefix
  * @param  string  $resource
  * @param  string  $method
  * @return string
  */
 protected function getGroupResourceName($prefix, $resource, $method)
 {
     $group = trim(str_replace('/', '.', $this->router->getLastGroupPrefix()), '.');
     if (empty($group)) {
         return trim("{$prefix}{$resource}.{$method}", '.');
     }
     return trim("{$prefix}{$group}.{$resource}.{$method}", '.');
 }
All Usage Examples Of Illuminate\Routing\Router::getLastGroupPrefix