public function show(Client $client)
 {
     //get all projects for this client
     $projects = $client->projects()->get();
     // $projects = $client->projects()->where()->get();
     return view('clients.show', compact('client', 'projects'));
 }
 /**
  * Store a newly created resource in storage.
  *
  * @param App\Client $client
  * @param  \Illuminate\Http\Requests\ProjectRequest  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Client $client, ProjectRequest $request)
 {
     $project = $client->projects()->create($request->all());
     flash()->success('Project Created!', $project->title . ' has been created.');
     return redirect()->route('clients.show', [$client]);
 }