As you develop your Laravel application, you may encounter situations where you need to change the data type of specific columns. Thankfully, Laravel allows us to change the column type in a table,...
Welcome to Laracoding
Recent Posts
As your application grows or when the requirements change, you may need to add a new column to an existing table. By default, when using an SQL database, a new column will be added at the end of the...
Using CSRF tokens add an extra layer of security by validating that the request originates from the same application and not from a malicious source. Laravel provides built-in protection against CSRF...
When working with Laravel Eloquent to query the databases usually we need to use at least one where condition and often times we need several. In Laravel Eloquent, you can add multiple where...
Why Use Laravel Form Request and How? (BIG Code improvement)
When working with Laravel, validating form data is crucial for security and data quality. Laravel can apply validation rules either based on the general Request class or by applying rules defined in...
How to Get Raw SQL Query From Laravel Query Builder or Model
When working with Laravel's Query Builder, you may sometimes need to retrieve the raw SQL query generated by your code. This can be useful for debugging or logging purposes, or when you want to...