Support the ongoing development of Laravel.io →
posted 10 years ago
IOC
Last updated 2 years ago.
0

That's just namespacing basics. Since your facade is in the MyFacades\Services namespace, just trying to call Session looks for it in the same namespace. You'll need a use statement at the top of your file.

http://www.php.net/manual/en/language.namespaces.php

Last updated 2 years ago.
0

Thanks for your reply. But How to use?

I have

namespace Yvoting\Services;
class HelloWorld  
{
        public function sayHello()
        {
            $vv = Session::get('sss', 'sssf');
    }
}
Last updated 2 years ago.
0

Solved, thanks thepsion5:

namespace Yvoting\Services;
use Session;

class HelloWorld  
{
    public function sayHello()
    {
        $vv = Session::get('sss', 'sssf');
    }
}
Last updated 2 years ago.
0

Or you can do this also:

\Session::get('bla');

Last updated 2 years ago.
0

Oh, yes. Sure. Thanks psychonetic

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.