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

error in entegrating the library in laravel 5 #6

Closed
rendhon opened this issue Jun 20, 2015 · 9 comments
Closed

error in entegrating the library in laravel 5 #6

rendhon opened this issue Jun 20, 2015 · 9 comments

Comments

@rendhon
Copy link

rendhon commented Jun 20, 2015

No description provided.

@rendhon
Copy link
Author

rendhon commented Jun 20, 2015

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 :

@aacotroneo
Copy link
Owner

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!!

@rendhon
Copy link
Author

rendhon commented Jun 20, 2015

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.

@aacotroneo
Copy link
Owner

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();
   }
}

@rendhon
Copy link
Author

rendhon commented Jun 20, 2015

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

@aacotroneo
Copy link
Owner

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'.

@rendhon
Copy link
Author

rendhon commented Jun 20, 2015

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

@rendhon
Copy link
Author

rendhon commented Jun 20, 2015

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.!

@aacotroneo
Copy link
Owner

Great. Im glad you got it working. Cheers
On Jun 20, 2015 2:22 PM, "rendhon" notifications@github.com 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)
.

@rendhon rendhon closed this as completed Jun 21, 2015
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

2 participants