Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Passing Boolean param in laravel via url

Tags:

url

php

laravel

According to this answer https://stackoverflow.com/a/29740218/7921383 handling Boolean values in URL is depend on framework.

How to pass Boolean values false and true in laravel?

like image 515
112Legion Avatar asked Dec 03 '22 17:12

112Legion


1 Answers

Since version laravel/framework: v6.13. There are added ability to call on the \Illuminate\Http\Request method boolean that will return true when value is "1", "true", "on", and "yes". Otherwise, returns false.

like image 178
112Legion Avatar answered Dec 11 '22 15:12

112Legion