Laravel par défaut Websie AR

//To make the default website with the language AR.
//At first time, the user does not have any session. So, we will add a
//session and set the language to be AR if it is not the first time. 
//Then, depending on the language you choose.

//web.php
Route::get('/', function () {
    if (Session::get('language') == 'en') {
        Session::put('language', 'en');
        App::setLocale('en');
        return redirect('main-services/1/1');
    } else {
        Session::put('language', 'ar');
        App::setLocale('ar');
        return redirect('main-services/1/1');
    }
});
Make Your Own Project