2021-10-15 10:37:47 +09:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Controllers\Api;
|
|
|
|
|
2021-10-20 10:24:11 +09:00
|
|
|
use App\Http\Controllers\Controller, Session;
|
2021-10-21 19:47:39 +09:00
|
|
|
use App\Http\Controllers\Api\CommonController as Common;
|
2021-10-15 10:37:47 +09:00
|
|
|
use Illuminate\Http\Request;
|
|
|
|
|
2021-10-21 19:47:39 +09:00
|
|
|
class AdminController extends Common {
|
|
|
|
private $common;
|
2021-10-15 10:37:47 +09:00
|
|
|
|
2021-10-21 19:47:39 +09:00
|
|
|
public function __construct () {
|
2021-10-22 00:07:12 +09:00
|
|
|
$this->common = new Common([
|
2021-10-22 11:05:19 +09:00
|
|
|
'guard' => 'admins',
|
2021-10-22 00:07:12 +09:00
|
|
|
'model' => new \App\Models\Admin,
|
|
|
|
]);
|
2021-10-21 19:47:39 +09:00
|
|
|
}
|
2021-10-20 12:54:57 +09:00
|
|
|
|
2021-10-15 10:37:47 +09:00
|
|
|
public function login (Request $r) {
|
2021-10-21 19:47:39 +09:00
|
|
|
return $this->common->login($r);
|
2021-10-16 13:24:01 +09:00
|
|
|
}
|
|
|
|
|
2021-10-20 16:54:26 +09:00
|
|
|
public function checkLogin () {
|
2021-10-22 00:07:12 +09:00
|
|
|
return $this->common->checkLogin();
|
2021-10-20 16:54:26 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
public function logout () {
|
2021-10-22 00:07:12 +09:00
|
|
|
return $this->common->logout();
|
2021-10-15 10:37:47 +09:00
|
|
|
}
|
|
|
|
}
|