TerrePorter said:
Did you run composer dump-autoload after adding the namespace?
Thank you TerrePorter. I done it, but same as before.
A couple things to try,
Eliminate the view to confirm data,
class BlogsController extends \BaseController {
public function index()
{
$clubid = Session::get('clubid');
// dump the db data
dd( Blog::clubBlog($clubid)->get()->toArray() );
return \View::make('default.public.default')->with('blogs',Blog::clubBlog($clubid)->get());
}
Another thing would be the look in the composer autoload and see if it has the model in the list of known classes, vendor/composer/autoload_classmap.php
actually this might be the issue, check the composer.json to make sure it is set to include the models folder in the autoload
"autoload": {
"classmap": [
"app/models",
...
TerrePorter said:
A couple things to try,
Eliminate the view to confirm data,
class BlogsController extends \BaseController { public function index() { $clubid = Session::get('clubid'); // dump the db data dd( Blog::clubBlog($clubid)->get()->toArray() ); return \View::make('default.public.default')->with('blogs',Blog::clubBlog($clubid)->get()); }
Another thing would be the look in the composer autoload and see if it has the model in the list of known classes, vendor/composer/autoload_classmap.php
actually this might be the issue, check the composer.json to make sure it is set to include the models folder in the autoload
"autoload": { "classmap": [ "app/models", ...
I have checked autoload_classmap.php and found one mistake with 'Blog' model. Thank you very much!
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community