i currently have a table in my view that has a delete button to delete a specific row here is my code for the view (table only)
<table class="table table-striped table-hover" id="detailTable">
<thead>
<tr>
<th>Record ID</th>
<th>Student ID</th>
<th>Student Name</th>
<th>Parent Account ID</th>
<th>Guardian Name</th>
<th>Role</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach ($vpc as $key => $pc)
<tr>
<td>{{ $pc->GuardianChildID }}</td>
<td>{{ $pc->StudentID }}</td>
<td>{{ $pc->full_name }}</td>
<td>{{ $pc->ParentAccountID }}</td>
<td>{{ $pc->pfull_name }}</td>
<td>{{ $pc->Roles }}</td>
<td><button class="btn">{{ HTML::linkRoute('delpc','Delete', array($pc->GuardianChildID)) }}</button></td>
</tr>
@endforeach
</tbody>
</table>
then in my route i have this code to handle the delete
Route::delete('viewa/{id}', array('as' => 'delpc', 'uses' => 'parentAcc@deleteAssignment'));
then in my controller here is the function that does the delete
public function deleteAssignment($id)
{
$deletegc = guardianChild::where('GuardianChildID', '=' , $id)
->delete();
return Redirect::to('viewa');
}
when executing this, im having a method not allowed exception .any ideas what im doing wrong?