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\Http\Middleware; | |
use Closure; | |
use Illuminate\Http\Request; | |
class EnableSsrMiddleware | |
{ | |
protected $expect = [ |
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
poetry add django; | |
poetry add djangorestframework; | |
poetry add django-cors-headers; | |
poetry add drf-extensions; | |
poetry add django-environ; | |
poetry add django-extensions; | |
poetry add django-filter; | |
poetry add django-storages; | |
poetry add django-redis; | |
poetry add django-lifecycle; |
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 | |
$updateTimezone = fn($timezone) => session()->put('timezone', $timezone); | |
?> | |
<div x-init="$wire.updateTimezone(Intl.DateTimeFormat().resolvedOptions().timeZone)"></div> |
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
import './bootstrap'; | |
window.addEventListener('livewire:init', () => { | |
Livewire.hook('request', ({ options }) => { | |
options.headers["X-Timezone"] = Intl.DateTimeFormat().resolvedOptions().timeZone; | |
}) | |
}) |
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
<meta http-equiv="refresh" content="{{ config('session.lifetime')*60 }}" /> |
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\Http\Middleware; | |
use Closure; | |
use Illuminate\Http\Request; | |
use Illuminate\Support\Facades\DB; | |
class TransactionEncapsulation | |
{ |
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\Support\Traits; | |
use Carbon\CarbonInterface; | |
use Illuminate\Contracts\Database\Eloquent\Builder; | |
trait HasPeriodColumns | |
{ | |
public function scopeOverlapping(Builder $query, CarbonInterface $start, CarbonInterface $end, string $startColumn, string $endColumn): Builder |
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
select | |
c.relname as name, | |
n.nspname as schema, | |
pg_total_relation_size (c.oid) as size, | |
obj_description (c.oid, 'pg_class') as comment | |
from | |
pg_class c, | |
pg_namespace n | |
where | |
c.relkind in ('r', 'p') |
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
select | |
viewname as name, | |
schemaname as schema, | |
definition from pg_views | |
where | |
schemaname not in ('pg_catalog', 'information_schema') | |
order by | |
viewname; |
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
select | |
t.typname as name, | |
n.nspname as schema, | |
t.typtype as type, | |
t.typcategory as category, | |
( | |
( | |
t.typinput = 'array_in'::regproc | |
and t.typoutput = 'array_out'::regproc | |
) |