/** * Store a newly created resource in storage. * * @param Request $request * @return Response */ public function store($location_id, Request $request) { $location = Location::find($location_id); // create the new Location $price = new Price(); $price->type = $request->type; $price->price = $request->price; $price->price_date = $request->price_date; $price->location()->associate($location); $price->save(); return redirect()->action('LocationController@show', $price->location->id); }