/** * @return \Illuminate\Routing\Route|null|string */ public function ingnoreId() { $id = $this->route('lot'); $instrument_id = $this->input('instrument_id'); return Lot::where(compact('id', 'instrument_id'))->exists() ? $id : ''; }
/** * Get all of the tasks for a given user. * * @param User $user * @return mixed */ public function forUser(User $user) { return Lot::where('user_id', $user->id)->orderBy('created_at', 'asc')->get(); }