Tag: PHP
-
Finally got my site to use the roots wordpress structure. Composer dependency management and deployment with laravel forge. š¤
-
How to easily set a custom redirect in Laravel form requests
In Laravel you can create custom request classes where you can house the validation for any given route. If that validation then fails, Laravelās default action is to redirect the visitor back to the previous page. This is commonly used for when a form is submitted incorrectly – The visitor will be redirected back to…
-
Laravel Blade push and stack
Laravelās blade view compiler is second to none. Iāve used a couple of different templating engines and blade is by far my favourite. Including Partials The way in which we include partials of views within our main views is as follows:@include(āpartials.my-first-partialā)It will inject that partialās content in the specified place. Defining Sections Within our views,…
-
Bypassing Laravel’s CSRF Middleware on selected routes (from 5.1)
A handy way to have some of your routes skip the middleware for CSRF protection. Handy in some situations.