Level 73
This is a guide should help you.
https://medium.com/@vineeth030/laravel-confirm-dialog-for-delete-button-5976554d839
May Sale! All accounts are 40% off this week.
I already google about this but couldn't understand on how to do it with my project. And i'm not good in javascript. Can anybody help me?
This is my controller
public function unassigned_judge(Request $request){
$judge_id = $request->input('judge_id');
$judge = User::findOrFail($judge_id);
$booth_id = $request->input('booth_id');
$judge->booth()->detach($booth_id);
return redirect()->back();
}
This is my blade
<div class="col-sm-6">
<b>Judges List:</b><br/>
@foreach($booth->judge as $j)
{!! Form::open(['method' => 'POST', 'action' => ['BoothUserController@unassigned_judge']]) !!}
<input type="hidden" name="booth_id" value="{{$booth->id}}">
<input type="hidden" name="judge_id" value="{{$j->id}}">
<tr>
<td width="50%"> {{$j->name}} </td>
{{--<td width="50%"> {!! Form::submit('Unassigned Judge', ['class'=>'btn btn-danger']) !!} </td><br/>--}}
<button title='Unassigned Judge' type="delete" class="btn btn-danger">Unassigned Judge</button>
</tr>
{!! Form::close() !!}
@endforeach
</div>
<button type="submit" class="btn btn-danger" onclick="return confirm('Delete This? Well Okay!')">Delete</button>
Please or to participate in this conversation.