PHP Class Arcanedev\Localization\Middleware\TranslationRedirect

Author: ARCANEDEV ([email protected])
Inheritance: extends Arcanedev\Localization\Bases\Middleware
Afficher le fichier Open project: arcanedev/localization

Méthodes publiques

Méthode Description
handle ( Illuminate\Http\Request $request, Closure $next ) : mixed Handle an incoming request.
translateRoute ( string $routeName, array $attributes = [] ) : Illuminate\Routing\Route | null Translate route.

Private Methods

Méthode Description
fireEvent ( string $locale, string $route, array $attributes ) : array Fire translation event.
getTranslatedUrl ( Illuminate\Http\Request $request ) : null | string Get translated URL.

Method Details

handle() public méthode

Handle an incoming request.
public handle ( Illuminate\Http\Request $request, Closure $next ) : mixed
$request Illuminate\Http\Request
$next Closure
Résultat mixed

translateRoute() public méthode

Translate route.
public translateRoute ( string $routeName, array $attributes = [] ) : Illuminate\Routing\Route | null
$routeName string
$attributes array
Résultat Illuminate\Routing\Route | null