How to Change Column in Migration Laravel

Laravel allows developers to use migrations for creating database tables. However, it’s not always easy to determine in advance which columns will be needed in the future or what type of data they will store. Consequently, rarely you may want to change a column name or even its data type. You can use the renameColumn() … Read more

How to Fix your App Key is Missing in Laravel

Laravel can encrypt data in database fields such as passwords. However, you must have configured the encryption key in the APP_KEY environment variable. If the variable is empty or the key has an invalid format, you will get an error. In this short article, I will explain how to fix the “your app key is … Read more

How to Run Raw SQL Query in Laravel

Laravel uses Eloquent to interact with the database. With it, you can perform quite complex queries. But sometimes you need to use database features that are not supported by Eloquent. In such cases, you can execute a SQL query. In Laravel, you can execute a simple SQL query and get the result as an array, … Read more

How to Use Elasticsearch in Laravel

Elasticsearch is one of the most popular Open-Source search engines. In addition to search, it provides a rich set of features like filtering, sorting, and aggregation. If you need to implement search using Elasticsearch in the Laravel application, you can use the official Elasticsearch client for PHP, but there is a much simpler way. Laravel … Read more

Exit mobile version