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
567 B
PHP
25 lines
567 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Models\Customer;
|
|
use App\Models\ServiceFile;
|
|
|
|
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(),
|
|
'serviceFiles' => ServiceFile::paginate(15),
|
|
'tab' => $tab,
|
|
]);
|
|
}
|
|
}
|