K
K
KoiGva2015-11-16 16:10:53
Laravel
KoiGva, 2015-11-16 16:10:53

Laravel 5 and template 404: how to pass data to template?

I can't figure out how to pass data to the 404 error template in Laravel 5, which is in views/errors/404.blade.php?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
Fet, 2015-11-16
@halenharper

ERRORS AND LOGGING
in /app/Exceptions/Hadler.php

public function render($request, Exception $e)
  {
    if ($e instanceof \Illuminate\Database\Eloquent\ModelNotFoundException) {
      return abort(404);
    }

    return parent::render($request, $e);
  }

Other error codes are caught in the same way.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question