Create a new Laravel site
MAMP PRO provides an easy way to set up the latest version of Laravel when creating a new site.
-
Click the ”+” button at the bottom of the sites list and select “Laravel” as the site type in the following dialog.
-
Confirm your selection by clicking the “Continue” button.
-
Enter the name of your Laravel site. In this example, we choose the name “my-site”.
-
For the “Site folder”, first create a new directory named “my-site” and then select it.
Note: Do not create your site folder inside the “/Applications/MAMP” directory. A better location for your site folders would be ”~/Sites/”. This helps keep your site data separate from the MAMP PRO application files.
-
Confirm your selection by clicking the “Continue” button.
-
You will now see the Laravel-specific settings:
-
Choose Your Database Type
- On the “Laravel Database settings” screen of the wizard, you will be asked to choose the type of database you want to use. You have two options:
- MySQL
- Enter the Database Name
In the field provided, enter the name for the new MySQL database that will be created. - Grant Access to User (Optional)
You can assign database access to a MySQL user. In the “Grant Access to User” field, you have two options:- Select an existing MySQL user from the dropdown list.
- Create a new MySQL user by entering a username.
- Set Password for New User
If you are creating a new user, you must also set a password in the password field.
- Enter the Database Name
- SQLite
No additional information is required. MAMP PRO will automatically create and configure an SQLite database file for your Laravel project.
- MySQL
- On the “Laravel Database settings” screen of the wizard, you will be asked to choose the type of database you want to use. You have two options:
-
-
Click the “Create Site” button to create your new site, including Laravel. This may take a few seconds, so please be patient.
-
The settings for your new site are saved automatically, and the servers and services are restarted if necessary.
-
To open your new site in your default browser, click the “Open” button to the right of the site name field.
-
Your new Laravel site will now look like this: