1 / 3

Laravel Migration

This Complete Laravel tutorial will direct the programmers and learners who wish to understand how to create a site using Laravel. https://www.phptpoint.com/laravel-tutorial/

Phptpoint
Download Presentation

Laravel Migration

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Laravel Migration Laravel Migration for beginners Migrations are basically known to be same as the version control for the user’s database that permits the user’s team to easily modify and share the application's database schema. These are usually paired with the Laravel's schema builder in order to build your application's database schema with extreme ease. In case the user ever had to tell a teammate about manually adding a column to their local database schema then any problem that have been faced will be solved by the database migrations.

  2. Generating Migrations There are basically various of ways that can be used by the programmer to generate this thing and one of the way is to create a migration the make:migration Artisan command that has been depicted below: by the use of php The new Laravel migration that has been generated will be placed generally in the user’s database directory. Every file name of this subject usually contains a timestamp that allows Laravel in order to determine the order of the migrations. artisan make:migration create_users_table Another method of this subject is to use the--table and -- create options that may also be used in order to indicate the name of the table and to check whether the migration will be creating a new table or not. These options are known for their ability to pre-fill the generated migration stub file with the specified table.

  3. Migration Structure The class of this method generally contains two methods that are up and down. The up method is usually used in order to add new tables, columns, or indexes to the user’s database on the other hand the down method is generally used in order to reverse the operations that have been performed by the up method. Please note that within both of these methods the user may use the Laravel schema builder in order to expressively create and modify tables. To grasp the concept of this completely and to know more about this subject, it is recommended to go through an online Laravel Tutorial that will enhance your learning process and will prepare you for the best to come.

More Related