Using Session class of Laravel 4 in custom class -



Using Session class of Laravel 4 in custom class -

in laravel 4 app, have custom class scaptcha in app/custom_libs/scaptcha/scaptcha.php

class scaptcha { public create() { //.....some code session::put('scaptcha_code',$code);

then in controller scaptchacontroller

$scaptcha = new scaptcha(); $scaptcha->create();

and laravel 4 throw me error:

class 'scaptcha\session' not found

it's clear error, how can implement session class of laravel in custom class scaptcha?

i figured out:

use illuminate\support\facades\session; class scaptcha {

and working fine :)

session laravel

Comments

Popular posts from this blog

javascript - I need to update the text of a paragraph by inline edit -

javascript - THREE.js reposition vertices for RingGeometry -

assembly - What is the addressing mode for ld, add, and rjmp instructions? -