mardi 15 novembre 2016

Using sub directories for models ( Laraval 5.3)

I have to use 3 databases for a project with regretably similar names for tables. I thought I would place them in sub directories so I created one under App called xmaster and place my models in there. To try my idea I have one - Section.

I thought then I should be able to reference it simply by amending the path in my web.php file:

Route::get('XProducts/Builder', function()
{ $section = new App\xmaster\Section(); 
  $sections = $section->with('sectionType'); 
return view('xmaster.builder.sections',['sections'=>$sections]); })->name('builderfront');

but I get an

Class 'App\xmaster\Section' not found

error, even if I add

uses App\xmaster\Section

Some help would be gratefully appreciated!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire