Convert request parameters to boolean in Laravel – Amit Merchant – A blog on PHP, JavaScript and more
Sometimes, you might want to convert some of the request parameters to boolean. For instance, take a checkbox field. Unless and until, it hasn’t been checked it won’t be passed through to the request. In such a case, it would be beneficial to convert such inputs to boolean.
Convert request parameters to boolean in Laravel – Amit Merchant – A blog on PHP, JavaScript and more
Sometimes, you might want to convert some of the request parameters to boolean. For instance, take a checkbox field. Unless and until, it hasn’t been checked it won’t be passed through to the request. In such a case, it would be beneficial to convert such inputs to boolean.
https://www.amitmerchant.com/convert-request-variable-parameters-laravel/