The PUT method is not supported for this route. Supported methods: GET, HEAD, POST.

Posted 2 months ago by muazzamazaz

Using following code:

Blade:

{!! Form::model($commission, array('action' => array('[email protected]', $commission->id), 'method' => 'PUT')) !!}

web.php

 Route::resource('commissions', 'CommissionController', [
        'names' => [
            'index'   => 'commissions',
            'destroy' => 'commissions.destroy',
        ],
    ]);

Controller

public function update(Request $request, $id)
    {
        
        $commission = Commission::find('destination_id',$id);

        $input = Input::only('destination_id','effective_date', 'ticketPrice','commPercentage');       
     
        $commission->fill($input)->save();

        return redirect('commissions/'.$destination->id)->with('success', trans('commission.updateSuccess'));
    }

Please sign in or create an account to participate in this conversation.