bpocallaghan / laravel-admin-starter

A Laravel Admin Starter project with Page Builder, Roles, Impersonation, Analytics, Blog, News, Banners, FAQ, Testimonials and more
http://bpocallaghan.co.za
341 stars 92 forks source link

Missing Namespace and Use declaration in the Admin/General controller group #30

Closed trianity closed 6 years ago

trianity commented 6 years ago

There was some missing and improper declaration of the Admin/General controller group generating 'Missing Controller Class Error'.

To correct the issue: In the file: .../routes/web.php Change line 132 to Route::group(['prefix' => 'general', 'namespace' => 'General'], function () {

And correct the header all of the Admin/General controller group files. Proper namespace is for this group: namespace App\Http\Controllers\Admin\General;

And all of the controllers in this group should have a line before the starting Class declaration: use App\Http\Controllers\Admin\AdminController;

trianity commented 6 years ago

Please review all the suggested changes in the fork at https://github.com/AkkuFresh/laravel-admin-starter

bpocallaghan commented 6 years ago

Hi @AkkuFresh Thanks for the great feedback. Yeah, the 'General' was really just a temporary storage until I move all of them into their proper namespace (\Banners, \Misc or whatever) - was still undecided. But I do admit, this is a bit nicer to already give them their namespace.

I also like that you moved User to the Models, I was also undecided about that one (due to the default location of laravel saving it there)

But very well done on the updates, always nice to do some refactor/cleanup :) Thanks a lot. Do you want to push them into the main branch or ?

bpocallaghan commented 6 years ago

merged the changes. Thanks again - please feel free to keep contributing :)

trianity commented 6 years ago

Your welcome!