public function boot()
{
Carbon::macro('range', function ($start, $end) {
return new Collection(
new DatePeriod(
$start,
new DateInterval('P1D'),
$end->copy()->add(new DateInterval('P1D'))
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 | |
| $finder = \PhpCsFixer\Finder::create() | |
| ->in(__DIR__) | |
| ->exclude(['bootstrap', 'storage', 'vendor']) | |
| ->name('*.php') | |
| ->name('_ide_helper') | |
| ->notName('*.blade.php') | |
| ->ignoreDotFiles(true) | |
| ->ignoreVCS(true); |
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 | |
| namespace App; | |
| use Exception; | |
| use Illuminate\Database\Eloquent\Model as Eloquent; | |
| class Model extends Eloquent | |
| { | |
| protected $default = ['id']; |
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 | |
| composer install | |
| cp .env.example .env | |
| php artisan key:generate | |
| php artisan migrate --seed | |
| npm install | |
| npm run dev |
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 | |
| class GlobalSearch | |
| { | |
| protected $searchGroups = [ | |
| 'Users' => UserSearchGroup::class, | |
| ]; | |
| protected function searchGroups() | |
| { |
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
| ./ngrok http -host-header=rewrite {url}:{port} | |
| # Example | |
| ./ngrok http -host-header=rewrite project.test:80 |
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 | |
| namespace App; | |
| use App\Support\Traits\GenerateUniqueCode; | |
| use App\Support\Contracts\GeneratesCodes; | |
| use Illuminate\Database\Eloquent\Model; | |
| class Lead extends Model implements GeneratesCodes | |
| { |
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
| class Errors { | |
| constructor() { | |
| this.errors = {}; | |
| } | |
| get(field) { | |
| if (this.errors[field]) { | |
| return this.errors[field][0]; | |
| } | |
| } |
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
| composer-link() { | |
| composer config repositories.local '{"type": "path", "url": "'$1'"}' --file composer.json | |
| } |
NewerOlder