1
0
mirror of https://github.com/cydrobolt/polr.git synced 2024-11-14 22:22:32 +01:00
polr/app/Http/Controllers/Controller.php

31 lines
609 B
PHP

<?php
namespace App\Http\Controllers;
use Laravel\Lumen\Routing\Controller as BaseController;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
class Controller extends BaseController {
protected function currIsAdmin() {
$role = session('role');
if ($role == 'admin') {
return true;
}
else {
return false;
}
}
protected function isLoggedIn() {
$username = session('username');
if (!isset($username)) {
return false;
}
else {
return true;
}
}
}