This file contains 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\Providers; | |
use Illuminate\Database\Eloquent\Builder; | |
use Illuminate\Database\Eloquent\ModelNotFoundException; | |
use Illuminate\Support\ServiceProvider; | |
class SafeQueryServiceProvider extends ServiceProvider | |
{ |
This file contains 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 | |
use Illuminate\Http\Request; | |
use Illuminate\Routing\Route; | |
use Illuminate\Support\Facades\Route as Router; | |
class RequestBuilder | |
{ | |
/** | |
* Will create a request with the correct fullUrl, route parameters and input parameters. |
This file contains 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\Support; | |
use Illuminate\Session\Store; | |
use RuntimeException; | |
/** | |
* Helper class that transforms all sessions into a specific key. | |
* |
This file contains 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\Support; | |
use Generator; | |
class ChunkCsvReader | |
{ | |
protected array|false $header; |
This file contains 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 Tests\Support; | |
use ReflectionClass; | |
use ReflectionException; | |
use ReflectionObject; | |
class PrivateAccess | |
{ |
This file contains 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\Support; | |
use Closure; | |
use Illuminate\Support\Facades\DB; | |
use Illuminate\Support\Str; | |
class Database | |
{ |
This file contains 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
export default class Str { | |
static slug(value, sep) { | |
var separator = sep || '-'; | |
value = Str.ascii(value); | |
var flip = separator == '-' ? '_' : '-'; | |
value = value.replace(new RegExp(Str.pregQuote(flip), 'g'), separator); |
This file contains 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
import joi from 'joi' | |
import validate from 'express-validation' | |
import middleware from 'middleware' | |
import AuthService from 'auth.service' | |
/** | |
* Controller's generic middleware | |
*/ | |
export const middleware = [middleware.authenticate('token')] |
This file contains 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
:: If you'd like to use a Hard Link, use /J instead of /D | |
:: Remember to run the script with admin access | |
@echo off | |
echo Storage Link: | |
:: Bind the Storage folder | |
mklink /D "%LOCALAPPDATA%\Spotify\Storage" "%~dp0Storage"; | |
echo Data Link: | |
:: Bind the Data folder | |
mklink /D "%LOCALAPPDATA%\Spotify\Data" "%~dp0Data"; | |
pause; |
This file contains 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\Rules; | |
use Illuminate\Support\Facades\Validator; | |
use Illuminate\Contracts\Validation\Rule; | |
class BaseRule | |
{ | |
protected $validator = null; |
NewerOlder