tracker icon indicating copy to clipboard operation
tracker copied to clipboard

Class 'Tracker' not found

Open AMAFsoft opened this issue 10 years ago • 12 comments

I'am using namespace in my controllers , this is my controller : [controllers/admin/AdminController.php]

theme = Theme::uses('admin'); $visitor = Tracker::currentSession(); dd($visitor); } public function getIndex() { $the_title = trans("admin.labels.dashboard"); return $this->theme->scope('index',compact('the_title')) ->render(); } ``` }

AMAFsoft avatar Oct 29 '14 13:10 AMAFsoft

I namespace my controllers too and I don't have any problems. Looks like at the time your controller was hit the alias wasn't still registered, you can do it manually in your app.php:

'Tracker' => 'PragmaRX\Tracker\Vendor\Laravel\Facade',

Tracker Service Provider does that for you automatically, unless you tell it to not to, in config.php, it also let you change the Alias name...

antonioribeiro avatar Oct 29 '14 13:10 antonioribeiro

Ah yes, but this is not exist in the documentation i think, Thank you very mach sir

AMAFsoft avatar Oct 29 '14 13:10 AMAFsoft

It does not exists because you should not need to do this, Tracker is supposed to do it automatically for you. But somehow in your application the controller is being hit before Tracker is able to create the Alias...

antonioribeiro avatar Oct 29 '14 13:10 antonioribeiro

Ah sorry ! Thank you again sir

AMAFsoft avatar Oct 29 '14 13:10 AMAFsoft

please help me, i'am found an error like this

Database [tracker] not configured. (View: C:\xampp\htdocs\project\ayam_jago\app\views\admin\page\visitor\index.blade.php)

idfluid avatar Nov 13 '14 11:11 idfluid

You need a 'tracker' connection in your app/conf/databases.php file, pointing to whatever database you want Tracker to write to. It can be your main database or a separate one.

antonioribeiro avatar Nov 13 '14 11:11 antonioribeiro

Change 'tracker' to 'mysql' in the config file. app/config/packages/pragmarx/tracker/config.php

AMAFsoft avatar Nov 13 '14 11:11 AMAFsoft

Or this :)

antonioribeiro avatar Nov 13 '14 11:11 antonioribeiro

Thank you very mach sir

idfluid avatar Nov 13 '14 12:11 idfluid

hello sir, i found error like this

ReflectionException in Container.php line 734:
Class PragmaRX\Tracker\Vendor\Laravel\Middlewares\Tracker does not exist

thanks,

hoeril avatar Aug 20 '16 05:08 hoeril

Good morning.

Hello, I have a similar hoeril error, I am using Laravel 5.2

The error message is:

ReflectionException in Container.php line 734:
Class PragmaRX\Tracker\Vendor\Laravel\Middlewares\Tracker does not exist

epalen avatar Aug 20 '16 13:08 epalen

I namespace my controllers too and I don't have any problems. Looks like at the time your controller was hit the alias wasn't still registered, you can do it manually in your app.php:

'Tracker' => 'PragmaRX\Tracker\Vendor\Laravel\Facade',

Tracker Service Provider does that for you automatically, unless you tell it to not to, in config.php, it also let you change the Alias name...

I am using Laravel 5.7 the same thing happening to me the error is saying Class tracker does not exist though I've added the alias already in config/app.php also cleared cache updated composer and tried composer dump-autoload seems doesn't work.

MishukAdhikari avatar Apr 05 '19 01:04 MishukAdhikari