Follow the below commands:
cd ~/.valet/Drivers
nano ShopwareSixValetDriver.php
# Paste contents of `ShopwareSixValetDriver.php`
valet restart
Follow the below commands:
cd ~/.valet/Drivers
nano ShopwareSixValetDriver.php
# Paste contents of `ShopwareSixValetDriver.php`
valet restart
cd ~/sites
valet park
# clone shopware
git clone -b 6.1 https://github.com/shopware/development.git shopware
# change directory
cd shopware
# install dependencies
composer install
# let valet know we're using shopware with a hidden file
touch .shopware-valet
# add to gitignore
echo '.shopware-valet' >> .gitignore
# install shopware
bin/setup
# now run installation wizard (40 steps, interactive shell)
# visit http://shopware.test
cd ~/sites
valet park
# clone shopware
git clone -b 6.1 https://github.com/shopware/production shopware
# change directory
cd shopware
# install dependencies
composer install
# let valet know we're using shopware with a hidden file
touch .shopware-valet
# add to gitignore
echo '.shopware-valet' >> .gitignore
# install shopware
bin/console system:setup
bin/console system:install --create-database --basic-setup
| <?php | |
| /** | |
| * Shopware 6 Laravel Valet Driver | |
| * @author Michael Burton <[email protected]> | |
| */ | |
| class ShopwareSixValetDriver extends LaravelValetDriver | |
| { | |
| /** | |
| * Determine if the driver serves the request. | |
| * | |
| * @param string $sitePath | |
| * @param string $siteName | |
| * @param string $uri | |
| * @return bool | |
| */ | |
| public function serves($sitePath, $siteName, $uri) | |
| { | |
| return file_exists($sitePath . '/.shopware-valet'); | |
| } | |
| /** | |
| * Determine if the incoming request is for a static file. | |
| * | |
| * @param string $sitePath | |
| * @param string $siteName | |
| * @param string $uri | |
| * @return string|false | |
| */ | |
| public function isStaticFile($sitePath, $siteName, $uri) | |
| { | |
| if (file_exists($staticFilePath = $sitePath.'/public/'.$uri)) { | |
| return $staticFilePath; | |
| } | |
| return false; | |
| } | |
| /** | |
| * Get the fully resolved path to the application's front controller. | |
| * | |
| * @param string $sitePath | |
| * @param string $siteName | |
| * @param string $uri | |
| * @return string | |
| */ | |
| public function frontControllerPath($sitePath, $siteName, $uri) | |
| { | |
| return $sitePath.'/public/index.php'; | |
| } | |
| } | |