You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-32Lines changed: 8 additions & 32 deletions
Original file line number
Diff line number
Diff line change
@@ -54,45 +54,21 @@ To start, ensure you have PostGIS enabled in your database - you can do this in
54
54
55
55
### Enable PostGIS via a Laravel migration
56
56
57
-
Create a new migration file by running
57
+
You need to publish the migration to easily enable PostGIS:
58
58
59
-
php artisan make:migration enable_postgis
60
-
61
-
Update the newly created migration file to call the `enablePostgisIfNotExists()` and `disablePostgisIfExists()` methods on the `Schema` facade. For example:
These methods are safe to use and will only enable / disable the PostGIS extension if relevant - they won't cause an error if PostGIS is / isn't already enabled.
94
70
95
-
If you prefer, you can use the `enablePostgis()` method which will throw an error if PostGIS is already enabled, and the `disablePostgis()` method twhich will throw an error if PostGIS isn't enabled.
71
+
If you prefer, you can use the `enablePostgis()` method which will throw an error if PostGIS is already enabled, and the `disablePostgis()` method twhich will throw an error if PostGIS isn't enabled.
0 commit comments