Laravel 5.6 – New @method and @csrf Blade Directives

Laravel is gonna introduce two new Blade Directives as part of 5.6 release, @method and @csrf Directives.

In the current Laravel 5.5 version, we are doing the following at the top of forms to create hidden inputs for the CSRF token and the spoofed HTTP method –

In the Version 5.6, you can use new Blade Directives as shown below to create hidden inputs for the CSRF token and the spoofed HTTP method

Below is the reference link –
https://github.com/laravel/framework/commit/5f1984421af096ef21b7d2011949a233849d4ee3

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.

Arjun

I am Arjun from Hyderabad (India). I have been working as a software engineer from last 7+ years, and its my passion to learn new things and implement them as a practice. Aside from work, I likes gardening and spending time with pets.


DMCA.com Protection Status