Q:

How To Update MySql Values By Using One Click In Laravel

I am creating a web site. So , there is a table to show users. In my database, I stored 0 for the Pending and 1 for the Approved under Action column. If some user has 0 , Pending will be displayed in this table and if the user has 1 Approved will be displayed. Now I want to when someone clicks this Pending button, I want to update database value to 1. I tried it as below. But , when I click Pending button, it gives me this error -
Sorry, the page you are looking for could not be found. 

In my address bar of web browser, I got the correct Id like this - http://localhost/cheapfares/invoice/approvededit/49
And also I was unable to update the database value.
How Can I Fix this ?? 
View Page. ( all-invoice.blade.com )
@if($Invoice->invoicestatus =="Pending")
<td><a href="approvededit/{{ $Invoice->invoicereference }}"><input type="submit" name="pending" value="Pending" class="btn btn-warning"></a></td>
@else
<td><a href="rejectededit/{{ $Invoice->invoicereference }}"><input type="submit" name="approved" value="Approved" class="btn btn-success"></a></td>
@endif

Controller Page. ( InvoicesController.php )
public function approvededit(Request $request, $invoicereference)
    {
        // Add Validation
        DB::table('invoices')
            ->where('invoicereference', $invoicereference)
            ->update(['invoicestatus' => 1]);
        //$request->session()->flash('Msg', 'Successfully Approved !!');
        return redirect('invoices.all-invoice');
    }

Route. 
Route::get('/approvededit/{invoicereference}', 'InvoicesController@approvededit');

A:

Update your current route  as you are using the route
http://localhost/cheapfares/invoice/approvededit/49
approvededit( and this is not the resource route function, so you need to add it properly
Route::get('/invoice/approvededit/{invoicereference}','InvoicesController@approvededit');

