- edit ~/.valet/Nginx/SITE_NAME.dev
- add
client_max_body_size 500M;
there:
- for HTTPS in server block which listens 443 (after
charset utf-8;
) - for HTTP in server block which listens 80
- run
valet restart
<?php | |
Artisan::command('ide-helper', function () { | |
$this->call('ide-helper:generate'); | |
$this->call('ide-helper:models', ['--nowrite' => true]); | |
$this->call('ide-helper:meta'); | |
})->describe('All IDE Helper commands combined'); |
<?php | |
namespace Tests; | |
use App\Exceptions\Handler; | |
use Illuminate\Contracts\Debug\ExceptionHandler; | |
use Illuminate\Foundation\Testing\TestCase as BaseTestCase; | |
abstract class TestCase extends BaseTestCase | |
{ |
<?php | |
// query builder | |
Model::selectRaw('YEAR(created_at) year, MONTHNAME(created_at) month, COUNT(*) published') | |
->groupBy('year', 'month') | |
->get() | |
->toArray(); | |
// parse month string | |
Carbon::parse('May')->month; |
<?php | |
namespace App; | |
class Album { | |
/** | |
* Get all of the orders for the book. | |
* | |
* @return \Illuminate\Database\Eloquent\Relations\MorphToMany |
# Basic stuff | |
sudo apt-get install git | |
sudo apt-get install unzip | |
# LAMP & Taskel | |
sudo apt-get install tasksel | |
sudo tasksel install lamp-server | |
# CURL for Composer | |
sudo apt-get install curl php-curl php-mcrypt php-mbstring php-gettext |
var _ = {}; | |
// | |
_.request = function (url, method, data, successCallback, errorCallback, isJson) { | |
var request = new XMLHttpRequest(); | |
request.open(method, url, true); | |
// | |
request.onload = function() { |
#!/bin/bash | |
LOG=/path/to/logs/COMMAND.log | |
while true; do | |
nohup /path/to/php /path/to/artisan COMMAND >> ${LOG} & | |
PID=$! | |
echo [`date +%Y-%m-%d:%H:%M:%S`] ${PID} STARTED >> ${LOG} |
<?php | |
return [ | |
'locale' => 'en', | |
'locales' => [ | |
'en' => 'English', | |
'ka' => 'Georgian', | |
'ru' => 'Russian', | |
], |
if(isset($argv[1]) && $argv[1] == 'list' && isset($argv[2]) && $argv[2] == '--xml') { | |
$argv[2] = '--format=xml'; | |
$_SERVER['argv'] = $argv; | |
} | |
if (isset($argv[1]) && $argv[1] === '-V') { | |
die('Symfony version 3.0.0'); | |
} |