See the new site: https://postgresisenough.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 | |
| namespace App\Traits\Models; | |
| use App\Models\Team; | |
| use Illuminate\Database\Eloquent\Builder; | |
| trait BelongsToTeam | |
| { | |
| // This method is executed when a new model is being created. |
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 Illuminate\Database\Migrations\Migration; | |
| use Illuminate\Database\Schema\Blueprint; | |
| use Illuminate\Support\Facades\Schema; | |
| return new class extends Migration | |
| { | |
| /** | |
| * Run the migrations. |
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 | |
| /** | |
| * Below is an the extended Filament resource your tenant panel resources | |
| * will have to extend so that the queries are scoped properly. | |
| */ | |
| namespace App\Filament; | |
| use Filament\Resources\Resource; |
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 ... | |
| use Filament\Forms\Components\Actions\Action; | |
| use Filament\Forms\Components\DateTimePicker; | |
| use Filament\Forms\Set; | |
| class NowAction extends Action | |
| { |
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\Console\Commands\Concerns; | |
| use React\EventLoop\Loop; | |
| trait RunsLoop | |
| { | |
| protected function loop(callable $callback, float $interval, float $lifetime): void | |
| { |
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
| { | |
| "indentSize": 4, | |
| "wrapAttributes": "auto", | |
| "wrapLineLength": 200, | |
| "endWithNewLine": true, | |
| "endOfLine": "LF", | |
| "useTabs": false, | |
| "sortTailwindcssClasses": true, | |
| "sortHtmlAttributes": "none", | |
| "noMultipleEmptyLines": 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
| // zod schema | |
| z.object({ | |
| // valid if string or: | |
| optional: z.string().optional(), // field not provided, or explicitly `undefined` | |
| nullable: z.string().nullable(), // field explicitly `null` | |
| nullish: z.string().nullish(), // field not provided, explicitly `null`, or explicitly `undefined` | |
| }); | |
| // type | |
| { |
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 CustomTicket extends CustomClipper<Path> { | |
| @override | |
| Path getClip(Size size) { | |
| final path = Path(); | |
| //Radius | |
| path.addRRect( | |
| RRect.fromRectAndRadius( | |
| Rect.fromLTWH(0, 0, size.width, size.height), | |
| const Radius.circular(8), | |
| ), |