} } throw new NotFoundHttpException(); }); Route::bind('tj', function ($value) { if (Auth::check()) { $object = TransactionJournal::where('id', $value)->where('user_id', Auth::user()->id)->first(); if ($object) { return $object; } } throw new NotFoundHttpException(); }); Route::bind('attachment', function ($value) { if (Auth::check()) { $object = Attachment::where('id', $value)->where('user_id', Auth::user()->id)->first(); if ($object) { return $object; } } throw new NotFoundHttpException(); }); Route::bind('currency', function ($value) { if (Auth::check()) { $object = TransactionCurrency::find($value); if ($object) { return $object; } } throw new NotFoundHttpException(); });