Search
 
SCRIPT & CODE EXAMPLE
 

PHP

back to same page after changing locale

@php
    $thisUrl = url()->current().'/';
    if (app()->getlocale() == 'en') {
        $newUrl  = str_replace('/en/', '/it/', $thisUrl);
    }else{
        $newUrl  = str_replace('/it/', '/en/', $thisUrl);
    }
 @endphp
Comment

PREVIOUS NEXT
Code Example
Php :: laravel model query time 
Php :: Drupal 9 how to pass arguments to custom blocks 
Php :: @hasSection 
Php :: foreach loog in php 
Php :: php pdo random multiple insert query 
Php :: dompdf setoptions breaks images 
Php :: array_unshift php 
Php :: generate hash password in laravel online 
Php :: wp table with hostname setup 
Php :: php isset and test 
Php :: Dropzone Attachment Required is not working 
Php :: wc php free shipping function 
Php :: Return back to a specific html element - Laravel 
Php :: Available excel column formatting 
Php :: vagrant no pg_hba.conf entry for host 
Php :: laravel artisan helper function 
Php :: laravel add params form submission 
Php :: current tab active on page reload in php 
Php :: multiple laravel site in one directory 
Php :: hide extension 
Php :: php check if string startswith 
Php :: check backend post type 
Php :: laravel tinker to test email on server 
Php :: php calculate variance 
Php :: Laravel eloquent mass assignments 
Php :: laravel helper.php session data 
Php :: laravel login register api 
Php :: php type generic object 
Php :: symony type request 
Php :: many posts in the isset 
ADD CONTENT
Topic
Content
Source link
Name
5+4 =