You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
687 B
PHTML
35 lines
687 B
PHTML
3 months ago
|
<?php
|
||
|
|
||
|
namespace App\Http\Controllers;
|
||
|
|
||
|
use Illuminate\Http\Request;
|
||
|
use Illuminate\Support\Carbon;
|
||
|
|
||
|
class DashboardController extends Controller
|
||
|
{
|
||
|
/**
|
||
|
* Create a new controller instance.
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
public function __construct()
|
||
|
{
|
||
|
$this->middleware('auth');
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Show the application dashboard.
|
||
|
*/
|
||
|
public function index(Request $request)
|
||
|
{
|
||
|
if (! $request->get('tab')) {
|
||
|
return redirect()->route('dashboard', ['tab' => 'active_orders']);
|
||
|
}
|
||
|
|
||
|
return view('dashboard', [
|
||
|
'today' => Carbon::today(),
|
||
|
'tab' => $request->get('tab'),
|
||
|
]);
|
||
|
}
|
||
|
}
|