start new:
tmux
start new with session name:
tmux new -s myname
Route::post('/git-auto-deploy/unique-key', function () { | |
$composer_dir = '/opt/cpanel/composer/bin'; | |
// | |
exec('printf "[Deploy Start]: $(date "+%Y-%m-%d %H:%M:%S")" >> ../deploy.log'); | |
exec("printf '\n' >> ../deploy.log"); | |
exec("git pull origin master &>>../deploy.log"); | |
exec('printf "[Deploy End]: $(date "+%Y-%m-%d %H:%M:%S")" >> ../deploy.log'); | |
exec("printf '\n' >> ../deploy.log"); | |
// |
$filesystem = new Filesystem(new Adapter([ | |
'host' => $this->portal_db_data->ftp_server, | |
'username' => $this->portal_db_data->ftp_user, | |
'password' => $this->portal_db_data->ftp_pass, | |
/** optional config settings */ | |
'port' => 21, | |
'root' => $this->ftp_file_path, | |
'passive' => true, | |
'ssl' => true, |
<?php | |
use App\Image as ImageModel; | |
use Intervention\Image\ImageManagerStatic as Image; | |
public function upload(Request $request) | |
{ | |
//Verifico Immagine | |
Validator::make(request()->all(), [ | |
'file' => 'image|mimes:jpeg,png,jpg,gif,svg|max:5120', | |
])->validate(); |
mysql -uroot -e "SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));" |