change the url variable for customer profile from id to marking

This commit is contained in:
omair saleh
2021-06-17 12:00:16 +08:00
parent 015f39ea65
commit 786cff10fd
+2 -1
View File
@@ -38,7 +38,8 @@ Route::get('/settings', function () {
return view('pages.settings');
})->name('settings');
Route::get('/customer/{id}', function ($id) {
Route::get('/customer/{marking}', function ($marking) {
$id = \App\Models\Company::where('reference', '=', $marking)->first()->id;
return view('pages.customers', ['id' => $id]);
})->name('customer.profile');