Home > Backend Development > PHP Tutorial > How to add a new field in Laravel, how to specify it after a certain field instead of adding it at the end

How to add a new field in Laravel, how to specify it after a certain field instead of adding it at the end

PHP中文网
Release: 2016-08-04 09:20:45
Original
1401 people have browsed it

As shown in the picture: I want to add the city field to the items table, but the default is to add it to the end. How to specify that it is added to the location field in the items table?

As shown in the picture: I want to add the city field to the items table, but the default is to add it to the end. How to specify that it is added to the location field in the items table?

$table->string('city')->after('location');
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template