Problem solved, for anyone else who might have a similar issue... the problem was with name spacing $blogs = App\Blog::all(); had to be changed to $blogs = \App\Blog::all();
If you plan on referencing that class again in that file, you could add a use
at the top to alias it.
...
use App\Blog;
class .....
{
public function show($id)
{
$blog = Blog::find($id);
...
}
}
I've just updated it and it's working perfectly, that seems to be a more permanent solution... thank you
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community