Example #1
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index(Contact $contact)
 {
     $contacts = $contact->whereUserId(auth()->user()->id)->orWhere('public', 1)->paginate(15);
     return view('contacts.index', compact('contacts'));
 }