app/Http/Controllers/FilmController.php
/**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
Update the specified resource in storage.
Update the specified resource in storage .
public function update(Request $request, $id)
    {
        $film = Film::find($id);
        $film->ticket_price = $request->get('ticket_price');
        $film->description = $request->get('description');
        $film->release_date = $request->get('release_date');
        $film->rating = $request->get('rating');
        $film->genre = $request->get('genre');
        $film->country = $request->get('country');
        $film->photo = $request->get('photo');
        $film->save();
        return response()->json('Successfully Updated');
    }
public function update ( Request $ request , $ id ) { $ film = Film :: find ( $ id ) ; $ film -> ticket_price = $ request -> get ( 'ticket_price' ) ; $ film -> description = $ request -> get ( 'description' ) ; $ film -> release_date = $ request -> get ( 'release_date' ) ; $ film -> rating = $ request -> get ( 'rating' ) ; $ film -> genre = $ request -> get ( 'genre' ) ; $ film -> country = $ request -> get ( 'country' ) ; $ film -> photo = $ request -> get ( 'photo' ) ; $ film -> save ( ) ; return response ( ) -> json ( 'Successfully Updated' ) ; }
Update the specified resource in storage.
Update the specified resource in storage .