PHP Class Arcanedev\Localization\Middleware\TranslationRedirect

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

Public Methods

Method 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

Method 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 method

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

translateRoute() public method

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