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 Create Unique Slug in Laravel

Very often there is a need to refer to a model by slug. For example, you may want to hide a real model ID in the URL and replace it with a slug for better readability. Slugs must contain only digits or letters and hyphens. And they must be unique. In this article we will … Read more