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.
topnotch_website/app/Http/Controllers/ManagementController.php

25 lines
567 B
PHTML

3 months ago
<?php
namespace App\Http\Controllers;
use App\Models\Customer;
2 months ago
use App\Models\ServiceFile;
3 months ago
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', [
2 months ago
'customers' => Customer::all(),
'serviceFiles' => ServiceFile::paginate(15),
'tab' => $tab,
3 months ago
]);
}
}