Skip to content

Commit d09bb30

Browse files
authored
Better README for Laravel App Engine Sample (GoogleCloudPlatform#672)
1 parent 6eafe66 commit d09bb30

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

appengine/php72/laravel-framework/README.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -73,26 +73,25 @@ Laravel, you need to manually add the `DB_SOCKET` value to
7373

7474
1. Follow the instructions to set up a
7575
[Google Cloud SQL Second Generation instance for MySQL][cloudsql-create].
76+
Keep track of your instance name and password, as they
77+
will be used below.
7678

7779
1. Follow the instructions to
7880
[install the Cloud SQL proxy client on your local machine][cloudsql-install].
7981
The Cloud SQL proxy is used to connect to your Cloud SQL instance when running
8082
locally.
8183

82-
1. Use the [Google Cloud SDK][cloud_sdk] from the command line to run the following command. Copy
83-
the `connectionName` value for the next step. Replace `YOUR_INSTANCE_NAME` with the name
84-
of your instance:
84+
* Use the [Google Cloud SDK][cloud_sdk] from the command line to run the following command. Copy the `connectionName` value for the next step. Replace `YOUR_INSTANCE_NAME` with the name of your instance:
8585

86-
gcloud sql instances describe YOUR_INSTANCE_NAME
86+
gcloud sql instances describe YOUR_INSTANCE_NAME | grep connectionName
8787

88-
1. Start the Cloud SQL proxy and replace `YOUR_INSTANCE_CONNECTION_NAME` with
89-
the connection name you retrieved in the previous step:
88+
* Start the Cloud SQL proxy and replace `YOUR_CONNECTION_NAME` with the connection name you retrieved in the previous step.
9089

91-
cloud_sql_proxy -instances=YOUR_INSTANCE_CONNECTION_NAME=tcp:3306
90+
cloud_sql_proxy -instances=YOUR_CONNECTION_NAME=tcp:3306
9291

93-
1. Use `gcloud` to create a database for the application.
92+
* Use `gcloud` to create a database for the application.
9493

95-
gcloud sql databases create laravel --instance=YOUR_INSTANCE_NAME
94+
gcloud sql databases create laravel --instance=YOUR_INSTANCE_NAME
9695

9796
1. Run the database migrations for Laravel. This can be done locally by setting
9897
your parameters in `.env` or by passing them in as environment variables. Be
@@ -101,7 +100,8 @@ Laravel, you need to manually add the `DB_SOCKET` value to
101100

102101
# create a migration for the session table
103102
php artisan session:table
104-
DB_DATABASE=laravel DB_USERNAME=root DB_PASSWORD=YOUR_DB_PASSWORD php artisan migrate --force
103+
export DB_DATABASE=laravel DB_USERNAME=root DB_PASSWORD=YOUR_DB_PASSWORD
104+
php artisan migrate --force
105105

106106
1. Modify your `app.yaml` file with the following contents:
107107

@@ -118,9 +118,9 @@ Laravel, you need to manually add the `DB_SOCKET` value to
118118
DB_DATABASE: laravel
119119
DB_USERNAME: root
120120
DB_PASSWORD: YOUR_DB_PASSWORD
121-
DB_SOCKET: "/cloudsql/YOUR_CLOUDSQL_CONNECTION_NAME"
121+
DB_SOCKET: "/cloudsql/YOUR_CONNECTION_NAME"
122122

123-
1. Replace each instance of `YOUR_DB_PASSWORD` and `YOUR_CLOUDSQL_CONNECTION_NAME`
123+
1. Replace each instance of `YOUR_DB_PASSWORD` and `YOUR_CONNECTION_NAME`
124124
with the values you created for your Cloud SQL instance above.
125125

126126
[php-gcp]: https://cloud.google.com/php
@@ -130,4 +130,3 @@ Laravel, you need to manually add the `DB_SOCKET` value to
130130
[cloud_sdk]: https://cloud.google.com/sdk/
131131
[cloudsql-create]: https://cloud.google.com/sql/docs/mysql/create-instance
132132
[cloudsql-install]: https://cloud.google.com/sql/docs/mysql/connect-external-app#install
133-

0 commit comments

Comments
 (0)