Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Controller.php
- public function reject($id)
- {
- $apply = Apply::find($id);
- $apply->apply_status = 0;
- $apply->save();
- return redirect('teamfinder/action')->with('success','Freelancer has been rejected');
- }
- public function destroy($id)
- {
- $apply = Apply::find($id);
- $apply->delete();
- return redirect('teamfinder/action')->with('success','Invitation has been deleted');
- }
- Blade.php
- <td class="text-center">
- <form action="{{ action('TeamFinder\ActionController@update', $applicant['id'] ) }}" method="post">
- @csrf
- <input name="_method" type="hidden" value="PATCH">
- <button data-toggle="tooltip" title="Approve" class="btn btn-effect-ripple btn-xs btn-success"><i class="hi hi-ok"></i></button>
- </form>
- <form action="{{ action('TeamFinder\ActionController@reject', $applicant['id'] ) }}" method="post">
- @csrf
- <input name="_method" type="hidden" value="PATCH">
- <button data-toggle="tooltip" title="Reject" class="btn btn-effect-ripple btn-xs btn-danger"><i class="fa fa-times"></i></button>
- </form>
- </td>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement