mirror of
https://repo.getmonero.org/AnonDev/xmrmemes.git
synced 2024-10-01 05:25:34 -04:00
38 lines
836 B
PHP
38 lines
836 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use Illuminate\Http\Request;
|
|
use App\Models\Meme;
|
|
use Artesaos\SEOTools\Facades\SEOTools;
|
|
|
|
class DashboardController extends Controller
|
|
{
|
|
/**
|
|
* Create a new controller instance.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function __construct()
|
|
{
|
|
$this->middleware('auth');
|
|
}
|
|
|
|
/**
|
|
* Show the application dashboard.
|
|
*
|
|
* @return \Illuminate\Contracts\Support\Renderable
|
|
*/
|
|
public function index()
|
|
{
|
|
SEOTools::setTitle('Dashboard');
|
|
if (\Auth::user()->is_admin === 1) {
|
|
$memes_pending = Meme::withoutGlobalScope('approved')->where('is_approved', 0)->get();
|
|
}
|
|
$data = [
|
|
'memes_pending' => $memes_pending ?? null,
|
|
];
|
|
return view('dashboard', ['data' => $data]);
|
|
}
|
|
}
|