Skip to content

Instantly share code, notes, and snippets.

@ahmadshah
Last active September 19, 2016 18:10
Show Gist options
  • Select an option

  • Save ahmadshah/506cb3b2d304269af0b66d3a0d33e239 to your computer and use it in GitHub Desktop.

Select an option

Save ahmadshah/506cb3b2d304269af0b66d3a0d33e239 to your computer and use it in GitHub Desktop.
<?php
namespace App\Http\Controllers;
use Illuminate\Http\RedirectResponse;
use Laravel\Lumen\Routing\Controller as BaseController;
class Controller extends BaseController {
public function __construct()
{
if (!isset($_SESSION['auth'])) {
return RedirectResponse::create('login');
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment