0

I am using laravel for my web application. I have integrated amember within my larvel site inside /publi/amember. Now i want to protect my routes using amember. Anyone knows how to do it. I am using L5 Moduler structure for my larvel site.

RAUSHAN KUMAR
  • 5,846
  • 4
  • 34
  • 70

1 Answers1

1

The best approach is use Am_Lite API to do it. http://www.amember.com/docs/API/Lite

So you need to include this file amember/library/Am/Lite.php within your application (before any output done) and then use the following call to check access:

Am_Lite::getInstance()->checkAccess(Am_Lite::PAID);

In event of user has necessary access then this call do nothing otherwise redirect user to login form.

Andrey Yerokhin
  • 273
  • 1
  • 7