app/Http/Controllers/RecipeController.php
/**
     * Show the form for editing the specified resource.
     *
     * @param  int  $id
     * @return Response
     */
Show the form for editing the specified resource.
@param  int  $id
@return Response
Show the form for editing the specified resource . @param int $id @return Response
public function edit($id)
    {
        $recipe = Recipe::find($id);
        if (Auth::User()->id == $recipe->user_id)
            return view('editRecipe', ['recipe' => $recipe]);
        else return redirect()->action('RecipeController@show', $id);
    }
public function edit ( $ id ) { $ recipe = Recipe :: find ( $ id ) ; if ( Auth :: User ( ) -> id == $ recipe -> user_id ) return view ( 'editRecipe' , [ 'recipe' => $ recipe ] ) ; else return redirect ( ) -> action ( 'RecipeController@show' , $ id ) ; }
Show the form for editing the specified resource.
Show the form for editing the specified resource .