Comments (11)
Your config may be reading from a cached file in which the variable/config file doesn't exists.
try clearing your cache.
php artisan cache:clear
from laravel-users.
php artisan config:clear
and
'defaultUserModel' => '\App\User',
did the trick!
from laravel-users.
You Are not using it correctly and your environment is t configured correctly m as well as your setup of your project is wrong as evidenced by serving the the wrong pathed folder.
from laravel-users.
from laravel-users.
Did you do all the steps exactly
from laravel-users.
from laravel-users.
I am facing the same issue on my laravel project.
What I did:
composer require jeremykenedy/laravel-users
php artisan vendor:publish --tag=laravelusers
php artisan migrate
php artisan serve
I do not have any new controllers in /app/Http/Controllers but vendor/jeremykenedy/laravel-users/src/App/Http/Controllers/UsersManagementController.php exists and throws the same error "Class name must be a valid object or a string " on line 52
config/laravelusers.php has an entry:
'defaultUserModel' => 'App\User',
My user model is specified in exaktly that file.
from laravel-users.
I just installed the package on a fresh Laravel install and it worked perfectly. I cannot duplicate the issue.
from laravel-users.
Strange. When I manually type in \App\User instead of config('laravelusers.defaultUserModel') it works.
Should php artisan vendor:publish --tag=laravelusers normally publish the controller as well? In my case it only publishes the views, the config and the translation files.
I am on Laravel 7.21.0
from laravel-users.
I cleared the cache but still the same issue.
App.User is the wrong path from vendor/jeremykenedy/laravel-users/src/App/Http/Controllers/UsersManagementController.php as a starting point...
from laravel-users.
I cannot replicate
from laravel-users.
Related Issues (20)
- How to render the blade file in the /resources/views/vendor/laravelusers/usersmanagement folder HOT 9
- Allow adding a custom middleware to all routes HOT 3
- Dutch Translation HOT 1
- Changing the route URL? HOT 1
- Sending data to create user blade view HOT 3
- Edit URL assumed as base_url HOT 2
- Using argon2id for password hashing
- 2FA supports? HOT 1
- Preventing XSS HOT 9
- [i18n] Untranslatable strings HOT 1
- [bug] Can't edit user e-mail address HOT 1
- How can we extend the controller?
- Custom Users Model (not being honored?) HOT 7
- route on show-users.blade.php HOT 1
- Add new columns to save on controller HOT 1
- Laravel 9.0 Support
- Support Laravel 10 and remove abandoned dependency HOT 1
- appJsPublicFile value suggestion for Laravel 9 \ Vite
- laravelcollective/html is abandoned, laravellux/html looks like a replacement candidate
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-users.