You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
417 B
27 lines
417 B
<?php
|
|
|
|
namespace App\Http\Controllers\Admin;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
|
|
class CommonController extends Controller
|
|
{
|
|
public $guardName = "admin";
|
|
|
|
public function guard()
|
|
{
|
|
return auth()->guard($this->guardName);
|
|
}
|
|
|
|
public function getUser()
|
|
{
|
|
return $this->guard()->user();
|
|
}
|
|
|
|
public function getUserId()
|
|
{
|
|
return $this->guard()->id();
|
|
}
|
|
|
|
}
|