简体   繁体   中英

How to Clone Laravel Project and Run on Mamp

I have an existing Laravel project I want to clone from GitHub.

I normally run Laravel on Homestead/Vagrant.

But this time I need to run it on Mamp.

I already cloned the project into my htdocs folder.

When I click to see my website, I see Index of/ then all the files.

Index of/

.env.example

.git/

.gitattributes

.gitignore

.phpintel/

app/

artisan

bootstrap/

composer.json

composer.lock

config/

database/

gulpfile.js

package.json

phpunit.xml

public/

readme.md

resources/

scratch3.php

server.php

storage/

tests/

What do I need to do/change/configure so my Laravel website works properly.

I'm on a Mac.

According to my experience, there are some steps for setting up an existing Laravel project as follows:

  1. Install PHP and Composer
  2. In your Laravel dir, run composer install
  3. Then copy .env.example file to .env
  4. Open .env and change a database connection information and save file
  5. Generate the application key by using a command php artisan key:generate
  6. Run a migration if exist by using a command php artisan migrate
  7. Then run composer dump-autoload
  8. Finally, start your project with command php artisan serve or create a shortcut in a public directory or Mamp and link it to public folder of your Laravel project.

Hope this helps, any comment is welcome.

如果您单击您的网站并且看到您的根目录,则可能需要稍微配置一下设置,这可能会有所帮助。 如何使htaccess在MAMP上工作

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM