LaravelDaily / quickadmin

Quick adminpanel builder package for Laravel 5
MIT License
600 stars 193 forks source link

Quickadmin doesn't work with custom namespace #115

Closed miguelmsoler closed 7 years ago

miguelmsoler commented 7 years ago

I have a laravel project with a custom namespace. I tried to add quickadmin on it, but after I run php artisan quickadmin:install i get:

PHP Fatal error: Class 'App\Http\Controllers\Controller' not found in /Users/miguelmartinezsoler/workspace/winwins/backend/vendor/laraveldaily/quickadmin/src/Controllers/QuickadminController.php on line 6

[Symfony\Component\Debug\Exception\FatalErrorException] Class 'App\Http\Controllers\Controller' not found

I think the reason why the error message is being shown is that you are using App\Http\Controllers\Controller; as base controller, but in my application (as in any app with custom namespace) the App namespace doesn't exist. I have a custom namespace instead.

<?php
--
  namespace Laraveldaily\Quickadmin\Controllers;
    
  use App\Http\Controllers\Controller;
    
  class QuickadminController extends Controller
  {
  /**
  * Show QuickAdmin dashboard page
  *
  * @return Response
  */
  public function index()
  {
  return view('admin.dashboard');
  }
  }

I don't have enough knowledge of laravel package development to suggest a hint. But I assume that there is some way to make it work, since I tried some other admin packages and they didn't show this error.

ModestasV commented 7 years ago

@miguelmsoler Hello, At this very moment this is out of our package scope and it probably will not come in the future. The reason for this is that we intended to use this package as a STARTER kit, not as a package in the middle of the work.

So, a tl;dr; version is that you can't really use our system as you want to use.