This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Create project folders first. Than run this script | |
parametr1=$1 | |
projectPath=/home/userName/PhpstormProjects | |
cp /etc/nginx/example.conf /etc/nginx/conf.d/$parametr1.conf | |
rpl -iqR example $parametr1 /etc/nginx/conf.d/$parametr1.conf | |
sed -i -e '1 s/^/127.0.0.1 '$parametr1'.local\n/;' /etc/hosts | |
service nginx restart | |
chown www-data $projectPath/$parametr1/bootstrap/cache/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Step 1. Create this class in the middleware folder (/app/Http/Middleware). | |
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
class BeforeAutoTrimmer { |
NewerOlder