50 likes | 180 Views
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/
E N D
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.
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.
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.