Rephrasing Question : I know how it works via form, i've been looking that if there is any way we can send "DATA", simply by calling URL (mentioned below) for PUT,PATCH and DELETE and csrf token will be taken from Kernel > Middleware not via form submit.
(改写问题 :我知道它是如何通过表单工作的,我一直在寻找是否有任何方法可以通过简单地通过调用URL(如下所述)来发送“数据”来获取PUT,PATCH和DELETE,而csrf令牌将从内核>中间件,不通过表单提交。)
I've been trying to use this method destroy()
DELETE method to be run from blade file like this
(我一直在尝试使用这种方法destroy()
DELETE方法从刀片文件运行,像这样)
<a class="p-2" href="{{ route('employees.destroy',[$key->id]) }}">Remove</a>
Can we override this method ?
(我们可以重写此方法吗?)
if (! function_exists('route')) {
/**
* Generate the URL to a named route.
*
* @param array|string $name
* @param mixed $parameters
* @param bool $absolute
* @return string
*/
function route($name, $parameters = [], $absolute = true)
{
return app('url')->route($name, $parameters, $absolute);
}
}
ask by Vipertecpro translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…