Tag: php
-
add soft delete in laravel
In the migration file add: In the model: In the controller: if you need to restore the deleted user
-
trim left characters in php
The ltrim() function removes whitespace or other predefined characters from the left side of a string. Related functions: rtrim() – Removes whitespace or other predefined characters from the right side of a string. trim() – Removes whitespace or other predefined characters from both sides of a string. Return Value: Returns the modified string Changelog: The charlist parameter was…
-
AH00126: Invalid URI in request GET
There’s two issues here that are likely contributing to your troubles. First, you can’t check for file existence so easily in a server context (as you are with httpd.conf), because the request hasn’t been mapped to the file system yet. If your requests for static resources happen to correspond directly to your file system structure…
-
ignore time in datetime mysql in select in laravel 8
They do the SQL DATE() work for you, and manage the differences of SQLite. Your result can be achieved as so: Though the above method is convenient, as noted by Arth it is inefficient on large datasets, because the DATE() SQL function has to be applied on each record, thus discarding the possible index. Here are some ways to…
