framework: No hint path defined for [errors]

  • Laravel Version: 6.0.4
  • PHP Version: 7.3.9

Description:

Laravel doesn’t find path for built in error page layouts such as @extends('errors::minimal') (for neither of errors::minimal, errors::layout, errors::illustrated-layout);

If I publish pages and have ordinary view path pointer it of course works. However I have done it in the past and find it very useful just to extend the vendor provided layout. If it is an intentional change for version ^6.0.0, then this, sadly, may be closed.

Real world example from another L5.8 project

image

Steps To Reproduce:

Clone and serve https://github.com/flexchar/laravel-error-blade-template

Or manual steps:

  1. Create blade view that extends built in error page layout. image
@extends('errors::minimal')

@section('title', $title ?? $message)
@section('code', 200)
@section('message', $message ?? $title)
  1. Return it as a view in a route:
return view('pages.simple')->withMessage('they are simple yet pretty');
  1. Get the following error Facade\Ignition\Exceptions\ViewException No hint path defined for [errors]. thrown: image

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 16 (5 by maintainers)

Most upvoted comments

Hey Guys, I had the same issue today, what was solved by changing @extends(‘errors:minimal’) to @extends(‘errors.minimal’) in the view. So change the colon to dot. Hopefully it will help you!

@MattHowdy Add “$this->registerErrorViewPaths();” line to the very first of render method.

public function render($request, Exception $exception)
{
    $this->registerErrorViewPaths();

   // your logic here.
}
  • Laravel Version: 9.25.1
  • PHP Version: 8.0.22

Having such error in my

resources/views/errors/404.blade.php

InvalidArgumentException

No hint path defined for [errors]. image

As write @DiogoLindoso

Hey Guys, I had the same issue today, what was solved by changing @extends(‘errors:minimal’) to @extends(‘errors.minimal’) in the view. So change the colon to dot. Hopefully it will help you!

It works for me, Laravel 7

  1. Change to @extends('errors.minimal')
  2. Copy file vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/views/minimal.blade.php to resources/views/errors/minimal.blade.php
  3. 404 error page is displayed correctly

Hey Guys, I had the same issue today, what was solved by changing @extends(‘errors:minimal’) to @extends(‘errors.minimal’) in the view. So change the colon to dot. Hopefully it will help you!

I am using Laravel 8 and it works for me,

Thanks so much,