Giter Club home page Giter Club logo

Comments (11)

jeremykenedy avatar jeremykenedy commented on June 18, 2024 1

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.

ettr avatar ettr commented on June 18, 2024 1

php artisan config:clear
and
'defaultUserModel' => '\App\User',
did the trick!

from laravel-users.

jeremykenedy avatar jeremykenedy commented on June 18, 2024

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.

titia-sudo avatar titia-sudo commented on June 18, 2024

from laravel-users.

jeremykenedy avatar jeremykenedy commented on June 18, 2024

Did you do all the steps exactly

from laravel-users.

titia-sudo avatar titia-sudo commented on June 18, 2024

from laravel-users.

ettr avatar ettr commented on June 18, 2024

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.

jeremykenedy avatar jeremykenedy commented on June 18, 2024

I just installed the package on a fresh Laravel install and it worked perfectly. I cannot duplicate the issue.

from laravel-users.

ettr avatar ettr commented on June 18, 2024

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.

ettr avatar ettr commented on June 18, 2024

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.

jeremykenedy avatar jeremykenedy commented on June 18, 2024

I cannot replicate

from laravel-users.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.