protected function userCreatedFlyer(Request $request) { return Flyer::where(['zip' => $request->zip, 'street' => $request->street, 'user_id' => $this->user()->id])->exists(); }
/** * @param Request $request * @return mixed */ protected function userCreatedFlyer(Request $request) { return Flyer::where(['zip' => $request->zip, 'street' => $request->street, 'user_id' => \Auth::id()])->exists(); }
/** * Determine if the user is authorized to make this request. * * @return bool */ public function authorize() { return Flyer::where(['zip' => $this->zip, 'street' => $this->street, 'user_id' => $this->user()->id])->exists(); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $flyers = Flyer::where(['user_id' => $this->user->id])->get(); return view('flyers.index', compact('flyers')); }
public function createdFlyer(Request $request) { Flyer::where(['street' => $request->street, 'zip' => $request->zip, 'user_id' => \Auth::user()->id])->exists(); }
/** * Determine if the user is authorized to make this request. * * @return bool */ public function authorize() { return Flyer::where(['postalCode' => $this->postalCode, 'street' => $this->street, 'user_id' => $this->user()->id])->exists(); }
/** * Determine if the user is authorized to make this request. * * @return bool */ public function authorize() { $this->street = str_replace('+', ' ', $this->street); return Flyer::where(['zip' => $this->zip, 'street' => $this->street, 'user_id' => $this->user()->id])->exists(); }