@php $prevURL = url()->previous(); $toURL = route('frontend.errors.404'); if(Str::contains($prevURL, '/frontend')) { $chunk = explode('/',$prevURL); $token = end($chunk); // print_r($chunk); if(Str::contains($token, '%7C')) { $toURL = route('frontend.errors.404', $token); } // dd($toURL); header("Location: " . URL::to($toURL), true, 302); exit(); } @endphp @extends('layouts.master') @section('title') Call Log Dashboard @endsection @section('css') @endsection @section('content')