tracker: Undefined index: PragmaRX\Tracker\Vendor\Laravel\Models\Session
after upgrade to laravel 5.7 I received this error
Undefined index: PragmaRX\Tracker\Vendor\Laravel\Models\Session
Undefined index: PragmaRX\Tracker\Vendor\Laravel\Models\Session {"exception":"[object] (ErrorException(code: 0): Undefined index: PragmaRX\\Tracker\\Vendor\\Laravel\\Models\\Session at C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Eloquent\\Model.php:241) [stacktrace]#0 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Eloquent\\Model.php(241): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError(8, 'Undefined index...', 'C:\\\\wamp\\\\www\\\\SPF...', 241, Array)#1 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Eloquent\\Model.php(167): Illuminate\\Database\\Eloquent\\Model->initializeTraits()#2 C:\\wamp\\www\\SPF\\vendor\\pragmarx\\tracker\\src\\Vendor\\Laravel\\Models\\Base.php(16): Illuminate\\Database\\Eloquent\\Model->__construct(Array)#3 C:\\wamp\\www\\SPF\\vendor\\pragmarx\\tracker\\src\\Vendor\\Laravel\\Models\\Session.php(24): PragmaRX\\Tracker\\Vendor\\Laravel\\Models\\Base->__construct(Array)#4 C:\\wamp\\www\\SPF\\vendor\\pragmarx\\tracker\\src\\Vendor\\Laravel\\ServiceProvider.php(417): PragmaRX\\Tracker\\Vendor\\Laravel\\Models\\Session->__construct()#5 C:\\wamp\\www\\SPF\\vendor\\pragmarx\\tracker\\src\\Vendor\\Laravel\\ServiceProvider.php(169): PragmaRX\\Tracker\\Vendor\\Laravel\\ServiceProvider->instantiateModel('session_model')#6 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(764): PragmaRX\\Tracker\\Vendor\\Laravel\\ServiceProvider->PragmaRX\\Tracker\\Vendor\\Laravel\\{closure}(Object(Illuminate\\Foundation\\Application), Array)#7 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(646): Illuminate\\Container\\Container->build(Object(Closure))#8 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(601): Illuminate\\Container\\Container->resolve('tracker.reposit...', Array)#9 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php(733): Illuminate\\Container\\Container->make('tracker.reposit...', Array)#10 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(1210): Illuminate\\Foundation\\Application->make('tracker.reposit...')#11 C:\\wamp\\www\\SPF\\vendor\\pragmarx\\tracker\\src\\Vendor\\Laravel\\ServiceProvider.php(150): Illuminate\\Container\\Container->offsetGet('tracker.reposit...')#12 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(764): PragmaRX\\Tracker\\Vendor\\Laravel\\ServiceProvider->PragmaRX\\Tracker\\Vendor\\Laravel\\{closure}(Object(Illuminate\\Foundation\\Application), Array)#13 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(646): Illuminate\\Container\\Container->build(Object(Closure))#14 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(601): Illuminate\\Container\\Container->resolve('tracker', Array)#15 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php(733): Illuminate\\Container\\Container->make('tracker', Array)#16 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(1210): Illuminate\\Foundation\\Application->make('tracker')#17 C:\\wamp\\www\\SPF\\vendor\\pragmarx\\tracker\\src\\Vendor\\Laravel\\ServiceProvider.php(635): Illuminate\\Container\\Container->offsetGet('tracker')#18 C:\\wamp\\www\\SPF\\vendor\\pragmarx\\tracker\\src\\Vendor\\Laravel\\ServiceProvider.php(493): PragmaRX\\Tracker\\Vendor\\Laravel\\ServiceProvider->getTracker()#19 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Events\\Dispatcher.php(357): PragmaRX\\Tracker\\Vendor\\Laravel\\ServiceProvider->PragmaRX\\Tracker\\Vendor\\Laravel\\{closure}('eloquent.bootin...', Array)#20 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Events\\Dispatcher.php(209): Illuminate\\Events\\Dispatcher->Illuminate\\Events\\{closure}('eloquent.bootin...', Array)#21 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Eloquent\\Concerns\\HasEvents.php(162): Illuminate\\Events\\Dispatcher->dispatch('eloquent.bootin...', Array)#22 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Eloquent\\Model.php(184): Illuminate\\Database\\Eloquent\\Model->fireModelEvent('booting', false)#23 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Database\\Eloquent\\Model.php(165): Illuminate\\Database\\Eloquent\\Model->bootIfNotBooted()#24 C:\\wamp\\www\\SPF\\vendor\\pragmarx\\tracker\\src\\Vendor\\Laravel\\Models\\Base.php(16): Illuminate\\Database\\Eloquent\\Model->__construct(Array)#25 C:\\wamp\\www\\SPF\\vendor\\pragmarx\\tracker\\src\\Vendor\\Laravel\\Models\\Session.php(24): PragmaRX\\Tracker\\Vendor\\Laravel\\Models\\Base->__construct(Array)#26 C:\\wamp\\www\\SPF\\vendor\\pragmarx\\tracker\\src\\Vendor\\Laravel\\ServiceProvider.php(417): PragmaRX\\Tracker\\Vendor\\Laravel\\Models\\Session->__construct()#27 C:\\wamp\\www\\SPF\\vendor\\pragmarx\\tracker\\src\\Vendor\\Laravel\\ServiceProvider.php(169): PragmaRX\\Tracker\\Vendor\\Laravel\\ServiceProvider->instantiateModel('session_model')#28 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(764): PragmaRX\\Tracker\\Vendor\\Laravel\\ServiceProvider->PragmaRX\\Tracker\\Vendor\\Laravel\\{closure}(Object(Illuminate\\Foundation\\Application), Array)#29 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(646): Illuminate\\Container\\Container->build(Object(Closure))#30 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(601): Illuminate\\Container\\Container->resolve('tracker.reposit...', Array)#31 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php(733): Illuminate\\Container\\Container->make('tracker.reposit...', Array)#32 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(1210): Illuminate\\Foundation\\Application->make('tracker.reposit...')#33 C:\\wamp\\www\\SPF\\vendor\\pragmarx\\tracker\\src\\Vendor\\Laravel\\ServiceProvider.php(150): Illuminate\\Container\\Container->offsetGet('tracker.reposit...')#34 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(764): PragmaRX\\Tracker\\Vendor\\Laravel\\ServiceProvider->PragmaRX\\Tracker\\Vendor\\Laravel\\{closure}(Object(Illuminate\\Foundation\\Application), Array)#35 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(646): Illuminate\\Container\\Container->build(Object(Closure))#36 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(601): Illuminate\\Container\\Container->resolve('tracker', Array)#37 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Application.php(733): Illuminate\\Container\\Container->make('tracker', Array)#38 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Container\\Container.php(1210): Illuminate\\Foundation\\Application->make('tracker')#39 C:\\wamp\\www\\SPF\\vendor\\pragmarx\\tracker\\src\\Vendor\\Laravel\\ServiceProvider.php(635): Illuminate\\Container\\Container->offsetGet('tracker')#40 C:\\wamp\\www\\SPF\\vendor\\pragmarx\\tracker\\src\\Vendor\\Laravel\\ServiceProvider.php(373): PragmaRX\\Tracker\\Vendor\\Laravel\\ServiceProvider->getTracker()#41 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Events\\Dispatcher.php(360): PragmaRX\\Tracker\\Vendor\\Laravel\\ServiceProvider->PragmaRX\\Tracker\\Vendor\\Laravel\\{closure}(Object(Illuminate\\Routing\\Events\\RouteMatched))#42 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Events\\Dispatcher.php(209): Illuminate\\Events\\Dispatcher->Illuminate\\Events\\{closure}('Illuminate\\\\Rout...', Array)#43 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(653): Illuminate\\Events\\Dispatcher->dispatch('Illuminate\\\\Rout...')#44 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(622): Illuminate\\Routing\\Router->runRoute(Object(Illuminate\\Http\\Request), Object(Illuminate\\Routing\\Route))#45 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php(611): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))#46 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php(176): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))#47 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php(30): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))#48 C:\\wamp\\www\\SPF\\vendor\enatomarinho\\laravel-page-speed\\src\\Middleware\\PageSpeed.php(27): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))#49 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(151): RenatoMarinho\\LaravelPageSpeed\\Middleware\\PageSpeed->handle(Object(Illuminate\\Http\\Request), Object(Closure))#50 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))#51 C:\\wamp\\www\\SPF\\vendor\enatomarinho\\laravel-page-speed\\src\\Middleware\\PageSpeed.php(27): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))#52 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(151): RenatoMarinho\\LaravelPageSpeed\\Middleware\\PageSpeed->handle(Object(Illuminate\\Http\\Request), Object(Closure))#53 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))#54 C:\\wamp\\www\\SPF\\vendor\enatomarinho\\laravel-page-speed\\src\\Middleware\\PageSpeed.php(27): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))#55 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(151): RenatoMarinho\\LaravelPageSpeed\\Middleware\\PageSpeed->handle(Object(Illuminate\\Http\\Request), Object(Closure))#56 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))#57 C:\\wamp\\www\\SPF\\vendor\enatomarinho\\laravel-page-speed\\src\\Middleware\\PageSpeed.php(27): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))#58 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(151): RenatoMarinho\\LaravelPageSpeed\\Middleware\\PageSpeed->handle(Object(Illuminate\\Http\\Request), Object(Closure))#59 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))#60 C:\\wamp\\www\\SPF\\vendor\enatomarinho\\laravel-page-speed\\src\\Middleware\\PageSpeed.php(27): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))#61 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(151): RenatoMarinho\\LaravelPageSpeed\\Middleware\\PageSpeed->handle(Object(Illuminate\\Http\\Request), Object(Closure))#62 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))#63 C:\\wamp\\www\\SPF\\vendor\enatomarinho\\laravel-page-speed\\src\\Middleware\\PageSpeed.php(27): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))#64 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(151): RenatoMarinho\\LaravelPageSpeed\\Middleware\\PageSpeed->handle(Object(Illuminate\\Http\\Request), Object(Closure))#65 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))#66 C:\\wamp\\www\\SPF\\vendor\enatomarinho\\laravel-page-speed\\src\\Middleware\\PageSpeed.php(27): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))#67 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(151): RenatoMarinho\\LaravelPageSpeed\\Middleware\\PageSpeed->handle(Object(Illuminate\\Http\\Request), Object(Closure))#68 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))#69 C:\\wamp\\www\\SPF\\vendor\\fideloper\\proxy\\src\\TrustProxies.php(57): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))#70 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(151): Fideloper\\Proxy\\TrustProxies->handle(Object(Illuminate\\Http\\Request), Object(Closure))#71 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))#72 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php(31): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))#73 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(151): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))#74 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))#75 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php(31): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))#76 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(151): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))#77 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))#78 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize.php(27): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))#79 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(151): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle(Object(Illuminate\\Http\\Request), Object(Closure))#80 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))#81 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode.php(62): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))#82 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(151): Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode->handle(Object(Illuminate\\Http\\Request), Object(Closure))#83 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))#84 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php(104): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))#85 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php(151): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))#86 C:\\wamp\\www\\SPF\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php(116): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))#87 C:\\wamp\\www\\SPF\\public\\index.php(55): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))#88 {main}"}
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 3
- Comments: 16 (1 by maintainers)
I’ve tried disabled
parent::__construct($attributes)
in https://github.com/antonioribeiro/tracker/blob/master/src/Vendor/Laravel/Models/Base.php#L16, seems to be working, but of course, not the desire solution.And i’m still look around for the proper solution.
Fixed!
I really didn’t like commenting the parent::__construct() function, it’s probably going to break a lot of things down the line which I don’t want to deal with.
I forked the project so I just did the changes in that repo, you can probably override the Model in your project to get the same result (see above for some instructions). Here’s what I did:
This workaround shouldn’t have any side effects. Still don’t solve the issue properly but at least it’s better.
@Wotuu has a good approach here while we wait for the patch. For those new with overriding the model here is what you’d do to get it working with Laravel 5.7:
Create a new model titled : “Session.php”, I placed it in a folder called Tracker like so
app\Tracker\Session.php
Extend the Vendor Model and then override the constructor:
Note: The name has to be “Session”, if you name it something else like Tracker_Session - a core sql query will fail. In this example ‘Tracker_Session’ would result in this sql query to be executed:
So the model name is what is used in the query. Keep that in mind.
to:
Enable the tracker, if you’re testing it on your localhost, empty the
'do_not_track_ips'
array to exclude it. It should work then. 👍Any Progress On This?.
bonus for Stats Controller
`<?php
namespace Modules\Administrator\Http\Controllers\Admin;
use Yajra\DataTables\Facades\DataTables; use Illuminate\Routing\Controller; use Illuminate\Support\Facades\View; use PragmaRX\Tracker\Vendor\Laravel\Facade as Tracker; use PragmaRX\Tracker\Vendor\Laravel\Support\Session;
class Stats extends AdminController { private $adminProperties = [ ‘admin’, ‘root’, ‘is_admin’, ‘is_root’, ];
}
`
And config: ‘stats_controllers_namespace’ => ‘Modules\Administrator\Http\Controllers\Admin’,
sorry, i used Module, please change Modules\Administrator\Http\Controllers\Admin to App\Http\Controllers\Admin
and copy all files view form vender to your APP