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 | |
SAIL=vendor/bin/sail | |
EXECUTOR=$SAIL | |
SAILCHECK=$($SAIL php -v 2>&1 >/dev/null) | |
if [[ $SAILCHECK == *"Sail is not running."* ]] || [[ $SAILCHECK == *"Docker is not running."* ]]; then | |
EXECUTOR=php | |
fi |
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
var myHeading = document.querySelector('h1'); | |
myHeading.textContent = 'Hallo Welt!'; |
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 | |
use LaracraftTech\LaravelUsefulTraits\UsefulScopes; | |
DB::table('scope_test_table')->insert([ | |
'foo' => 'foo', | |
'bar' => 'bar', | |
'quz' => 'quz', | |
]); |
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 | |
use LaracraftTech\LaravelUsefulTraits\UsefulEnums; | |
enum PaymentType: int | |
{ | |
use UsefulEnums; | |
case Pending = 1; | |
case Failed = 2; |
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 | |
use LaracraftTech\LaravelUsefulTraits\UsefulScopes; | |
$class = new class extends Model | |
{ | |
use UsefulScopes; | |
protected $timestamps = true; | |
protected $table = 'scope_tests'; |
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 | |
use LaracraftTech\LaravelUsefulTraits\UsefulScopes; | |
$class = new class extends Model | |
{ | |
use UsefulScopes; | |
protected $timestamps = true; | |
protected $table = 'scope_tests'; |
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 | |
/* | |
* ================== | |
* For Pest - Pest.php | |
* ================== | |
*/ | |
use LaracraftTech\LaravelUsefulTraits\RefreshDatabaseFast; |
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 | |
/** | |
* A php 8 like match expression for php 7 | |
* | |
* @param $value | |
* @param array $expressionArray | |
* @return mixed | |
* @throws Exception | |
*/ |
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 | |
use LaracraftTech\LaravelDateScopes\DateScopes; | |
class Transaction extends Model | |
{ | |
use DateScopes; | |
} | |
// Usage |
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
server { | |
listen 80; | |
listen [::]:80; | |
server_name example-app.test; | |
root /home/zacha/code/example-app/public; | |
add_header X-Frame-Options "SAMEORIGIN"; | |
add_header X-Content-Type-Options "nosniff"; | |
index index.php; |
OlderNewer