Coder Social home page Coder Social logo

Comments (9)

rendhon avatar rendhon commented on June 28, 2024

Class 'Aacotroneo\Saml2\Facades\Facade' not found having this error in laravel 5
after

adding "aacotroneo/laravel-saml2": "*" in my composer.json and updated already
*already added
'providers' => [
...
'Aacotroneo\Saml2\Saml2ServiceProvider',
]

'alias' => [
...
'Saml2' => 'Aacotroneo\Saml2\Facades\Saml2Auth',
]

*created a controller with codes :

from laravel-saml2.

aacotroneo avatar aacotroneo commented on June 28, 2024

You don't need to include the alias if you are not using it. As you are accessing the Facade directly, you should use php namespaces (prefix it with the inverted slash - \Saml2Auth::login();). The alias alternative is to put a 'use Saml2' and call 'Saml2::login()'

If that's not the problem, provide the full stack.
Cheers!!

from laravel-saml2.

rendhon avatar rendhon commented on June 28, 2024

aah? therefore ... something wrong in my controller?? can you please edit that controller for me? i'm new here in laravel 5 .. thx for bearing with me.

from laravel-saml2.

aacotroneo avatar aacotroneo commented on June 28, 2024

just modify the index(). Add a back-slash to the call and see if it works. You don't need to add the 'alias' entry.

use Aacotroneo\Saml2\Facades\Saml2Auth;
class myController extends Controller {
   public function index()
   {
       \Saml2Auth::login();
   }
}

from laravel-saml2.

rendhon avatar rendhon commented on June 28, 2024

got a new error
Class 'Saml2Auth' not found :(

from laravel-saml2.

aacotroneo avatar aacotroneo commented on June 28, 2024

hmm... this is strange.. This is just php... composer should load the autoload of all your dependencies (i.e this library).. and you should be able to use those classes. Try running a 'composer dump-autoload'.

from laravel-saml2.

rendhon avatar rendhon commented on June 28, 2024

still having the error ! i also alreading updated my composer.json for the updates. but stiLL Class 'Saml2Auth' not found

from laravel-saml2.

rendhon avatar rendhon commented on June 28, 2024

i already fixed it sir. is just updated my composer.json for your new updates.. then applied my controller code on above.. thnx.. for kind reponse.. more power. :)
i think i installed the unupdated library.. last month i think . sorry..! hahaha careless.!

from laravel-saml2.

aacotroneo avatar aacotroneo commented on June 28, 2024

Great. Im glad you got it working. Cheers
On Jun 20, 2015 2:22 PM, "rendhon" [email protected] wrote:

i already fixed it sir. is just updated my composer.json for your new
updates.. then applied my controller code on above.. thnx.. for kind
reponse.. more power. :)

โ€”
Reply to this email directly or view it on GitHub
#6 (comment)
.

from laravel-saml2.

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.