!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/laravel-crm/vendor/diglactic/laravel-breadcrumbs/src/Exceptions/   drwxrwxrwx
Free 13.2 GB of 57.97 GB (22.77%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     UnnamedRouteException.php (2.01 KB)      -rw-rw-rw-
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace Diglactic\Breadcrumbs\Exceptions;

use 
Facade\IgnitionContracts\BaseSolution;
use 
Facade\IgnitionContracts\ProvidesSolution;
use 
Facade\IgnitionContracts\Solution;
use 
Illuminate\Routing\Route;
use 
Illuminate\Support\Arr;
use 
Illuminate\Support\Facades\App;
use 
Illuminate\Support\Str;

/**
 * Exception that is thrown if the user attempt to render breadcrumbs for the current route but the current route
 * doesn't have a name.
 */
class UnnamedRouteException extends BaseException implements ProvidesSolution
{
    
/** @var \Illuminate\Routing\Route */
    
private $route;

    public function 
__construct(Route $route)
    {
        
$uri Arr::first($route->methods()) . ' /' ltrim($route->uri(), '/');

        
parent::__construct("The current route ($uri) is not named");

        
$this->route $route;
    }

    public function 
getSolution(): Solution
    
{
        
$method strtolower(Arr::first($this->route->methods()));
        
$uri $this->route->uri();
        
$action $this->route->getActionName();

        if (
$action === '\Illuminate\Routing\ViewController') {
            
$method 'view';
            
$action "'" . ($this->route->defaults['view'] ?? 'view-name') . "'";
        } elseif (
$action === 'Closure') {
            
$action "function() {\n    ...\n}";
        } else {
            
$action "'" Str::replaceFirst(App::getNamespace() . 'Http\Controllers\\'''$action) . "'";
        }

        
$links = [];
        
$links['Route-bound breadcrumbs'] = 'https://github.com/diglactic/laravel-breadcrumbs#route-bound-breadcrumbs';
        
$links['Silencing breadcrumb exceptions'] = 'https://github.com/diglactic/laravel-breadcrumbs#route-binding-exceptions';
        
$links['Laravel Breadcrumbs documentation'] = 'https://github.com/diglactic/laravel-breadcrumbs';

        return 
BaseSolution::create('Give the route a name')
            ->
setSolutionDescription("For example:

```php
Route::
$method('$uri', $action)->name('sample-name');
```"
)
            ->
setDocumentationLinks($links);
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0063 ]--