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.
25 lines
505 B
PHP
25 lines
505 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Models\Customer;
|
|
use Illuminate\Http\Request;
|
|
|
|
class ManagementController extends Controller
|
|
{
|
|
protected string $defaultTab = 'customers';
|
|
|
|
public function index(string $tab = null)
|
|
{
|
|
if (!$tab)
|
|
{
|
|
return redirect()->route('management.index', ['tab' => $this->defaultTab]);
|
|
}
|
|
|
|
return view('management.index', [
|
|
'customers' => Customer::all(),
|
|
'tab' => $tab,
|
|
]);
|
|
}
|
|
}
|