After installed "laracasts/flash": "^1.3"
package, I am trying to make a view and this is my code:
@include('gazett.errors')
Where in gazett.errors
blade.php file code is here :
<div class="row">
<div class="col-md-7 col-md-push-3" style="padding: 5px 24px!important;">
@include('flash::message')
@if($errors->any())
<ul class="alert alert-danger text-center rtl ur fsize26" style="list-style: none;">
@foreach($errors->all() as $error)
<li style="color: #000 !important;"> {{ $error }} </li>
@endforeach
</ul>
@endif
</div>
But I get this error: No hint path defined for [flash].
Where my directory structure is given in link Directory Structure When I visit browser, the error is here :
ErrorException in FileViewFinder.php line 112:
No hint path defined for [flash]. (View: E:\Web\xampp\htdocs\wifaq-atropos\resources\views\gazett\errors.blade.php) (View: E:\Web\xampp\htdocs\wifaq-atropos\resources\views\gazett\errors.blade.php) (View: E:\Web\xampp\htdocs\wifaq-atropos\resources\views\gazett\errors.blade.php)
That issue come out when I try to upgrade laravel version from 5.0 to 5.2. Where no error in previous version project 5.0. How to fix it ?
I had similar error when using larvael 5.2, here is how i resolved it.
Include this service provider within config/app.php of your project
'providers' => [
Laracasts\Flash\FlashServiceProvider::class,];
On the same file look for aliases; add this line
'aliases' => [ 'Flash' => Laracasts\Flash\Flash::class, ]
The above addition to config/app.php makes @include('flash::message') in my view to work fine
And then, if using Laravel 5, include the service provider within config/app.php.
'providers' => [
'Laracasts\Flash\FlashServiceProvider'
];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With