[WIP] Setup of skeleton
This commit is contained in:
39
app/Http/Controllers/Shop/Admin/DashboardController.php
Normal file
39
app/Http/Controllers/Shop/Admin/DashboardController.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Shop\Admin;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
use App\Repositories\Users;
|
||||
|
||||
class DashboardController extends Controller
|
||||
{
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the application dashboard.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$data = [];
|
||||
$dashboard = 'dashboard_general';
|
||||
|
||||
if (Users::hasRole('admin')) {
|
||||
$dashboard = 'dashboard';
|
||||
$data = [];
|
||||
}
|
||||
|
||||
return view('shop.admin.Dashboard.index', $data);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user