Coder Social home page Coder Social logo

Comments (5)

jonagoldman avatar jonagoldman commented on May 18, 2024

You should read the repo issues first: #21. Although not sure this is exactly your problem.
The conclusion of that issue is that because ClassName::class magically evaluates as "ClassName", without triggering autoloading of that class, you don't get the Class App\User does not exist error even if the class does not exist. I hope next versions of PHP follow this rule so nothing breaks in the future. Because of that I'm not sure why your are getting the error. Are you sure its related to Bouncer or maybe just something in your Laravel's config file? And also provide error stack trace so it's possible to understand wheres the error coming from.

from bouncer.

happyDemon avatar happyDemon commented on May 18, 2024

This is the exact stacktrace I'm getting:
[2016-01-21 13:18:40] local.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Class 'App\User' not found' in /Users/maximkerstens/Desktop/projects/xarona-app/vendor/silber/bouncer/src/Database/Models.php:105
Stack trace:
#0 {main}

when I correct it to the correct namespace manually, there's no error

My auth.model config has been pointing to the correct model all this time

from bouncer.

JosephSilber avatar JosephSilber commented on May 18, 2024

@happyDemon when you change the User model's location, you have to let Laravel's auth system know about it.

Bouncer will use that information to correctly get the model.

Which version of Bouncer are you using?

from bouncer.

JosephSilber avatar JosephSilber commented on May 18, 2024

@happyDemon has this been fixed? If not, can you please provide more information about your isuue?

from bouncer.

happyDemon avatar happyDemon commented on May 18, 2024

It's been fixed, I'm completely baffled why it didn't give an error the second time I installed.
User model's path was correctly filled in for laravel's auth system.
oh well, works now

from bouncer.

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.