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 App\Http\Controllers\jeremykenedy\LaravelLogger\App\Http\Controllers\LaravelLoggerController does not exist #84

Closed
amirhosseinporsami opened this issue Mar 26, 2020 · 7 comments

Comments

@amirhosseinporsami
Copy link

Why i have exception like this
"Class App\Http\Controllers\jeremykenedy\LaravelLogger\App\Http\Controllers\LaravelLoggerController does not exist"
when i want to acces route /activity?
@jeremykenedy

@stanley87
Copy link

@ahph37 has your side fix this issue?i am having same issue when using this package

@jeremykenedy
Copy link
Owner

jeremykenedy commented May 21, 2020

Are you implementing as outlined in the readme?

Are you doing anything different like trying to define your own routes in web.php?

The issue was originally closed because it did not have enough information to replicate as outlined here: https://github.com/jeremykenedy/laravel-logger#opening-an-issue

@stanley87
Copy link

stanley87 commented May 21, 2020

yes,i am using the own routes same as your doc like this

Route::group(['prefix' => 'activity', 'namespace' => 'jeremykenedy\LaravelLogger\app\Http\Controllers', 'middleware' => ['web', 'auth', 'activity']], function () {

// Dashboards
Route::get('/', 'LaravelLoggerController@showAccessLog')->name('activity');
Route::get('/cleared', ['uses' => 'LaravelLoggerController@showClearedActivityLog'])->name('cleared');

// Drill Downs
Route::get('/log/{id}', 'LaravelLoggerController@showAccessLogEntry');
Route::get('/cleared/log/{id}', 'LaravelLoggerController@showClearedAccessLogEntry');

// Forms
Route::delete('/clear-activity', ['uses' => 'LaravelLoggerController@clearActivityLog'])->name('clear-activity');
Route::delete('/destroy-activity', ['uses' => 'LaravelLoggerController@destroyActivityLog'])->name('destroy-activity');
Route::post('/restore-log', ['uses' => 'LaravelLoggerController@restoreClearedActivityLog'])->name('restore-activity');

});

@stanley87
Copy link

my side even try use custom vendor path load like below,still facing same issue too

"psr-4": {
"App\": "app/",
"jeremykenedy\LaravelLogger\": "vendorcustom/jeremykenedy/laravel-logger/src/"
}

@jeremykenedy
Copy link
Owner

jeremykenedy commented May 21, 2020

The routes are built into to the package and wrapped in group that assigned the namespace.

https://github.com/jeremykenedy/laravel-logger/blob/master/src/routes/web.php

Route::group(['prefix' => 'activity', 'namespace' => 'jeremykenedy\LaravelLogger\App\Http\Controllers', 'middleware' => ['web', 'auth', 'activity']], function () {
...
});

@azuan85
Copy link

azuan85 commented Oct 22, 2020

Adding \ before namespace solve my problem

Route::group(['prefix' => 'admin/activity', 'namespace' => '\jeremykenedy\LaravelLogger\App\Http\Controllers', 'middleware' => ['web', 'auth', 'activity']], function () {

@PositiveZahid
Copy link

PositiveZahid commented Dec 16, 2020

Adding \ before namespace solve my problem

Route::group(['prefix' => 'admin/activity', 'namespace' => '\jeremykenedy\LaravelLogger\App\Http\Controllers', 'middleware' => ['web', 'auth', 'activity']], function () {

Thanks

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

5 participants