First, check that the flash facade got imported. Run php artisan tinker
from your project directory and run this:
\Flash::info('hello');
I use the package from caffinated.
"caffeinated/flash": "dev-master",
Xum, thanks for your reply, yes the thing that Flash is not getting imported. But as I mentioned before I updated my service providers and aliases, and used "Laracasts\Flash\Flash;", but still it throws error. It is the first package which does not work according guides, as I have imported and used quite some without problem. I think I will just switch to another flash package as illuminate3 suggested or will use Session::flash for that job.
I am once again back on this topic, as I can not get imported Flash package neither from "laracasts/flash" or neither from "caffeinated/flash". Whenever I try to access Flash class, I got "Flash class not found..."
So I will try to explain step by step what I did, to figure out what I have done wrong:
And now when I try to access Flash facade, I import Facade at the top of the class I am using
use Caffeinated\Flash;
However I can not reference it neither by Flash or neither by \Flash. I always get Flash class not found...
this might be a little to late, but make sure that you have both:
'Laracasts\Flash\FlashServiceProvider',
and
'Flash' => 'Laracasts\Flash\Flash',
in your config/app.php file
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community