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
$handler = new StreamHandler($path); | |
$handler->setFormatter(new LineFormatter(null, "Y-m-d H:i:s", true, true)); | |
Log::channel('upkfile')->getLogger()->popHandler(); | |
Log::channel('upkfile')->getLogger()->pushHandler($handler); |
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
Remove package.json | |
Remove webpack.mix.js | |
Remove /resources | |
Remove /routes/web.php | |
Remove welcome.blade.php | |
Remove api route prefix so that API routes are at the root path | |
Comment out web middleware in HTTP Kernel | |
Adjust exception hanlder to always return JSON |
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
<?php | |
declare(strict_types=1); | |
namespace App\Traits; | |
use Closure; | |
use Illuminate\Cache\RateLimiter; | |
/** |
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
PHP-FPM: Settings | |
1. How much memory each PHP FPM process is consuming: | |
ps --no-headers -o "rss,cmd" -C php-fpm | awk '{ sum+=$1 } END { printf ("%d%s\n", sum/NR/1024,"M") }' | |
2. Server ram: | |
free -h | |
Use: https://spot13.com/pmcalculator/ | |
or |
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
; See https://spot13.com/pmcalculator/ for configuration | |
; Start a new pool named 'www'. | |
; the variable $pool can be used in any directive and will be replaced by the | |
; pool name ('www' here) | |
[www] | |
; Per pool prefix | |
; It only applies on the following directives: | |
; - 'access.log' | |
; - 'slowlog' |
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
<?php | |
declare(strict_types=1); | |
namespace Tests; | |
use Illuminate\Foundation\Testing\RefreshDatabase as FrameworkRefreshDatabase; | |
use Illuminate\Foundation\Testing\RefreshDatabaseState; | |
trait RefreshDatabase |
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
app()->detectEnvironment(fn () => 'production'); | |
$this->refreshApplication(); |
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
<?php | |
trait EnhancedEnum | |
{ | |
/** | |
* Get the enum value from the name. e.g case INVOICE = 'invoice'; will return 'invoice' | |
* | |
* @param string $name | |
* @return static | |
*/ |
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
<?php | |
declare(strict_types=1); | |
namespace Database\Helpers; | |
use Illuminate\Support\Facades\Schema; | |
class ForeignKey | |
{ |
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
<?php | |
declare(strict_types=1); | |
namespace Database\Helpers; | |
use Illuminate\Support\Facades\Schema; | |
class Column | |
{ |