when i installed it why can't show the kernal.php in app>http ??
where i put this :
<?php namespace App\Http;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
class Kernel extends HttpKernel {
/**
* The application's route middleware.
*
* @var array
*/
protected $middlewareAliases = [
/**** OTHER MIDDLEWARE ****/
'localize' => \Mcamara\LaravelLocalization\Middleware\LaravelLocalizationRoutes::class,
'localizationRedirect' => \Mcamara\LaravelLocalization\Middleware\LaravelLocalizationRedirectFilter::class,
'localeSessionRedirect' => \Mcamara\LaravelLocalization\Middleware\LocaleSessionRedirect::class,
'localeCookieRedirect' => \Mcamara\LaravelLocalization\Middleware\LocaleCookieRedirect::class,
'localeViewPath' => \Mcamara\LaravelLocalization\Middleware\LaravelLocalizationViewPath::class
];
}
Starting from Laravel 11, the
app/Http/Kernel.phpfile no longer exists. Instead, you can register your middleware classes inside the callback ofwithMiddleware()insidebootstrap/app.phpfiles.Inside the
withMiddleware()method, you can use thealias()method of theIlluminate\Foundation\Configuration\Middlewareclass to register your middleware classes' aliases.Here's an example:
More information available in the documentation at https://laravel.com/docs/11.x/middleware#middleware-aliases