Search
 
SCRIPT & CODE EXAMPLE
 

PHP

how send user to 404 page if not exist page in laravel

//step 1 ) create the errors/404.blade.php in view.

// step 2 ) go to Handler.php and replace the render function to belwo function.
  public function render($request, Throwable $exception)
    {
        if ($exception instanceof AccessDeniedHttpException) {
            return response(view('errors.404'), 404);
        }
        return parent::render($request, $exception);
    }
Comment

PREVIOUS NEXT
Code Example
Php :: laravel where multiple conditions 
Php :: wordpress is home page 
Php :: Flutter migrate to Android Studio 
Php :: laravel cron job on shared hosting 
Php :: php pdo update 
Php :: PHP substr_count — Count the number of substring occurrences 
Php :: symfony datetime now 
Php :: php date from format 
Php :: require in php 
Php :: php get first element of array 
Php :: laravel db query 
Php :: get taxonomy term meta by id 
Php :: wp php get_the_category posts loop 
Php :: php list directories 
Php :: Exception::getMessage in php 
Php :: start someones laravel project 
Php :: add categories to custom post type 
Php :: add days to date in php 
Php :: laravel foreach 
Php :: delete mysql php 
Php :: laravel model exists id 
Php :: phpexcel set data type string 
Php :: create migration laravel 
Php :: Sending Data over another website via PHP 
Php :: php add property to object 
Php :: php auto redirect 
Php :: foreach in php 
Php :: laravel-medialibrary packagist 
Php :: how to get plugin directory path in wordpress 
Php :: php destroy session after some time 
ADD CONTENT
Topic
Content
Source link
Name
4+1 =