Skip to content

Instantly share code, notes, and snippets.

@Tjoosten Tjoosten/error-stack.txt
Last active Apr 6, 2018

Embed
What would you like to do?
<!--
Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException: in file C:\Users\Gebruiker\Desktop\bloailer\vendor\laravel\framework\src\Illuminate\Routing\RouteCollection.php on line 255
Stack trace:
1. Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException-&gt;() C:\Users\Gebruiker\Desktop\bloailer\vendor\laravel\framework\src\Illuminate\Routing\RouteCollection.php:255
2. Illuminate\Routing\RouteCollection-&gt;methodNotAllowed() C:\Users\Gebruiker\Desktop\bloailer\vendor\laravel\framework\src\Illuminate\Routing\RouteCollection.php:242
3. Illuminate\Routing\RouteCollection-&gt;getRouteForMethods() C:\Users\Gebruiker\Desktop\bloailer\vendor\laravel\framework\src\Illuminate\Routing\RouteCollection.php:176
4. Illuminate\Routing\RouteCollection-&gt;match() C:\Users\Gebruiker\Desktop\bloailer\vendor\laravel\framework\src\Illuminate\Routing\Router.php:613
5. Illuminate\Routing\Router-&gt;findRoute() C:\Users\Gebruiker\Desktop\bloailer\vendor\laravel\framework\src\Illuminate\Routing\Router.php:602
6. Illuminate\Routing\Router-&gt;dispatchToRoute() C:\Users\Gebruiker\Desktop\bloailer\vendor\laravel\framework\src\Illuminate\Routing\Router.php:591
7. Illuminate\Routing\Router-&gt;dispatch() C:\Users\Gebruiker\Desktop\bloailer\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php:176
8. Illuminate\Foundation\Http\Kernel-&gt;Illuminate\Foundation\Http\{closure}() C:\Users\Gebruiker\Desktop\bloailer\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php:30
9. Illuminate\Routing\Pipeline-&gt;Illuminate\Routing\{closure}() C:\Users\Gebruiker\Desktop\bloailer\vendor\fideloper\proxy\src\TrustProxies.php:57
10. Fideloper\Proxy\TrustProxies-&gt;handle() C:\Users\Gebruiker\Desktop\bloailer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php:149
11. Illuminate\Pipeline\Pipeline-&gt;Illuminate\Pipeline\{closure}() C:\Users\Gebruiker\Desktop\bloailer\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php:53
12. Illuminate\Routing\Pipeline-&gt;Illuminate\Routing\{closure}() C:\Users\Gebruiker\Desktop\bloailer\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\TransformsRequest.php:30
13. Illuminate\Foundation\Http\Middleware\TransformsRequest-&gt;handle() C:\Users\Gebruiker\Desktop\bloailer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php:149
14. Illuminate\Pipeline\Pipeline-&gt;Illuminate\Pipeline\{closure}() C:\Users\Gebruiker\Desktop\bloailer\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php:53
15. Illuminate\Routing\Pipeline-&gt;Illuminate\Routing\{closure}() C:\Users\Gebruiker\Desktop\bloailer\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\TransformsRequest.php:30
16. Illuminate\Foundation\Http\Middleware\TransformsRequest-&gt;handle() C:\Users\Gebruiker\Desktop\bloailer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php:149
17. Illuminate\Pipeline\Pipeline-&gt;Illuminate\Pipeline\{closure}() C:\Users\Gebruiker\Desktop\bloailer\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php:53
18. Illuminate\Routing\Pipeline-&gt;Illuminate\Routing\{closure}() C:\Users\Gebruiker\Desktop\bloailer\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\ValidatePostSize.php:27
19. Illuminate\Foundation\Http\Middleware\ValidatePostSize-&gt;handle() C:\Users\Gebruiker\Desktop\bloailer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php:149
20. Illuminate\Pipeline\Pipeline-&gt;Illuminate\Pipeline\{closure}() C:\Users\Gebruiker\Desktop\bloailer\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php:53
21. Illuminate\Routing\Pipeline-&gt;Illuminate\Routing\{closure}() C:\Users\Gebruiker\Desktop\bloailer\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode.php:46
22. Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode-&gt;handle() C:\Users\Gebruiker\Desktop\bloailer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php:149
23. Illuminate\Pipeline\Pipeline-&gt;Illuminate\Pipeline\{closure}() C:\Users\Gebruiker\Desktop\bloailer\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php:53
24. Illuminate\Routing\Pipeline-&gt;Illuminate\Routing\{closure}() C:\Users\Gebruiker\Desktop\bloailer\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php:102
25. Illuminate\Pipeline\Pipeline-&gt;then() C:\Users\Gebruiker\Desktop\bloailer\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php:151
26. Illuminate\Foundation\Http\Kernel-&gt;sendRequestThroughRouter() C:\Users\Gebruiker\Desktop\bloailer\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php:116
27. Illuminate\Foundation\Http\Kernel-&gt;handle() C:\Users\Gebruiker\Desktop\bloailer\public\index.php:55
28. require_once() C:\Users\Gebruiker\Desktop\bloailer\server.php:21
-->
$(document).ready(function() {
// For A Delete Record Popup
$('.popup-record').click(function() {
var id = $(this).attr('data-id');
var url = $(this).attr('data-url');
var method = $(this).attr('data-method');
var token = document.head.querySelector('meta[name="csrf-token"]').content;
$(".popup-record-model").attr("action", url);
$('body').find('.popup-record-model').append('<input name="_token" type="hidden" value="'+ token +'">');
$('body').find('.popup-record-model').append('<input name="_method" type="hidden" value="'+ method +'">');
$('body').find('.popup-record-model').append('<input name="id" type="hidden" value="'+ id +'">');
});
$('.remove-data-from-delete-form').click(function() {
$('body').find('.popup-record-model').find( "input" ).remove();
});
$('.modal').click(function() {
$('body').find('.popup-record-model').find("input").remove();
});
});
<a class="text-danger popup-record" data-toggle="modal" data-url="{{ route('admin.users.delete', $user) }}" data-method="DELETE" data-id="{{ $user->id }}" data-target="#delete-user">
<i class="fa fa-fw fa-close"></i>
</a>
<form action="" method="POST" class="popup-record-model">
<div id="delete-user" class="modal modal-danger fade" tabindex="-1" role="dialog" aria-labelledby="delete-user-label" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="delete-user-label">
<i class="fa fw fa-warning"></i> {{ __('users.modals.delete.title') }}
</h4>
</div>
<div class="modal-body">
<p>{{ __('users.modals.delete.text') }}</p>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-sm btn-outline">
<i class="fa fa-fw fa-trash"></i> {{ __('users.modals.delete.btn-delete') }}
</button>
<button type="button" class="btn btn-sm btn-outline" data-dismiss="modal">
<i class="fa fa-fw fa-undo"></i> {{ __('users.modals.btn-cancel') }}
</button>
</div>
</div>
</div>
</div>
</form>
Route::delete('/users/delete/{id}', 'Admin\UsersController@destroy')->name('admin.users.delete');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.