Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class 'Tracker' not found #44

Open
AMAFsoft opened this issue Oct 29, 2014 · 12 comments
Open

Class 'Tracker' not found #44

AMAFsoft opened this issue Oct 29, 2014 · 12 comments

Comments

@AMAFsoft
Copy link

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(); } ``` }
@antonioribeiro
Copy link
Owner

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...

@AMAFsoft
Copy link
Author

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

@antonioribeiro
Copy link
Owner

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...

@AMAFsoft
Copy link
Author

Ah sorry !
Thank you again sir

@idfluid
Copy link

idfluid commented Nov 13, 2014

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)

@antonioribeiro
Copy link
Owner

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.

@AMAFsoft
Copy link
Author

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

@antonioribeiro
Copy link
Owner

Or this :)

@idfluid
Copy link

idfluid commented Nov 13, 2014

Thank you very mach sir

@hoeril
Copy link

hoeril commented Aug 20, 2016

hello sir,
i found error like this

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

thanks,

@epalen
Copy link

epalen commented Aug 20, 2016

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

@MishukAdhikari
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants