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
public function boot(): void | |
{ | |
Collection::macro('pluckUnique', function (string $firstAttribute, string $secondAttribute, $glue = null) { | |
return $this->map(function ($item) use ($firstAttribute, $secondAttribute) { | |
$item->firstAttributeCleaned = Str::lower($item->{$firstAttribute}); | |
$item->secondattributeCleaned = Str::lower($item->{$secondAttribute}); | |
return $item; | |
})->mapWithKeys(function ($value, $key) use ($firstAttribute, $secondAttribute, $glue) { |
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
@props(['on', 'method'=>'success', 'title'=>null]) | |
@php | |
if( !in_array($method, ['success', 'warning', 'error', 'info']) ){ | |
$method = 'info'; | |
} | |
if( empty($title) && $slot->isEmpty() ){ | |
$title = __('Success'); | |
} | |
@endphp |
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\Support\Facades\Blade; | |
use Illuminate\Support\ServiceProvider; | |
final class ViewServiceProvider extends ServiceProvider | |
{ | |
public function boot(): void |
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
@servers([ | |
'staging' => '[email protected] -p 22', | |
'production' => '[email protected] -p 22', | |
]) | |
@setup | |
if (empty($server)) { | |
exit('ERROR: envoy run option --server is undefined'.PHP_EOL); | |
} | |
if($server=='production'){ |
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
PUSHER_APP_ID=examplesite-appid | |
PUSHER_APP_KEY=examplesite-appkey | |
PUSHER_APP_SECRET=examplesite-appsecret | |
PUSHER_APP_CLUSTER=mt1 | |
PUSHER_HOST=www.examplesite.com | |
PUSHER_PORT=6001 | |
PUSHER_SCHEME=http | |
LARAVEL_WEBSOCKETS_PORT=443 | |
LARAVEL_WEBSOCKETS_VERIFY_PEER=false |
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 "../../node_modules/@tabler/core/src/scss/tabler.scss"; | |
.table { | |
tfoot { | |
th { | |
color: $table-th-color; | |
background: $table-th-bg; | |
font-weight: var(--#{$prefix}font-weight-bold); | |
text-transform: uppercase; | |
letter-spacing: .04em; |
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
.flatpickr-calendar { | |
.numInputWrapper { | |
.arrowUp, | |
.arrowDown { | |
width: 20px; | |
padding: 0; | |
&:after { |
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 | |
if (! isset($scrollTo)) { | |
$scrollTo = 'body'; | |
} | |
$scrollIntoViewJsSnippet = ($scrollTo !== false) | |
? <<<JS | |
(\$el.closest('{$scrollTo}') || document.querySelector('{$scrollTo}')).scrollIntoView() | |
JS | |
: ''; |
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 | |
/** | |
* Plugin Name: Page templates from plugin | |
* Plugin URI: | |
* Description: Page templates from plugin | |
* Version: 1.0.0 | |
* Author: Pierre Lebedel | |
* Author URI: https://www.pierrelebedel.fr | |
*/ |
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 | |
/** | |
* Jours fériés en France | |
* Source : https://phpsources.net/code/php/date-heure/641_jours-feries-en-france | |
*/ | |
class FrenchHolidays { | |
public static function isHoliday($day=false, $alsacemoselle=false){ |
NewerOlder