You can add where clause to a model like ->where(/*condition*/) Sometimes We need to add orWhere condition to our queries, between two cases. This might interfere with other conditions so we need to pass them in a function. To get…
Category: Laravel
Laravel Quick DB query building:
How can we increase and decrease in Laravel? Laravel gives us the function to do this fast and effectively. Please follow the below instructions to do this. Increase Value of a numeric column Decrease Value of a numeric column
How To Bypass csrf Token For A Route In Laravel?
Laravel Csrf token is security tokens but sometimes we don’t need them in our request URLs. We Need to edit Only One file for this called VerifyCsrfToken.php. Path:- /app/Http/Middleware/VerifyCsrfToken.php Add Below Code In The Class:- Note:- Remember To match url…
How To Select Different Column of data as one with Laravel and MySql?
Laravel uses query builder to perform database operations so you don’t need to rewrite the query for different database Platform. Let us assume a table with three column called cert1, cer2 and cert3 First we need to select the column…