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 Filament\Billing\Providers\Http\Middleware\VerifySparkBillableIsSubscribed; | |
| use Filament\Facades\Filament; | |
| class VerifyProjectIsBillable extends VerifySparkBillableIsSubscribed | |
| { | |
| public function handle($request, $next, $subscription = 'default', $plan = null) |
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\Filament\Resources; | |
| // use ... | |
| class FeedbackResource extends Resource | |
| { | |
| // ... rest of the class |
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 | |
| // Custom HasPagination interface | |
| namespace App\Http\Integrations\GithubApi\Contracts; | |
| use Saloon\Http\Request; | |
| use Saloon\PaginationPlugin\Paginator; | |
| interface HasPagination |
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; | |
| use App\Models\Project; | |
| use Illuminate\Console\Command; | |
| use Illuminate\Support\Facades\Storage; | |
| use Spatie\Browsershot\Browsershot; | |
| class GenerateOpenGraphImage extends Command |
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 | |
| add_filter( 'wp_handle_upload', 'yourprefix_strip_metadata_from_images_on_upload' ); | |
| function yourprefix_strip_metadata_from_images_on_upload( array $upload ): array { | |
| if ( ! in_array( $upload['type'], array( 'image/jpeg', 'image/png', 'image/gif' ), true ) ) { | |
| return $upload; | |
| } | |
| try { | |
| yourprefix_strip_metadata_from_image( $upload['file'] ); |
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 App\Providers\RouteServiceProvider; | |
| use App\Models\User; | |
| use Illuminate\Auth\Events\Lockout; | |
| use Illuminate\Support\Facades\RateLimiter; | |
| use Illuminate\Support\Str; | |
| use Illuminate\Validation\ValidationException; | |
| use Livewire\Attributes\Layout; | |
| use Livewire\Attributes\Rule; |
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 | |
| // On top of the User model add: | |
| use App\Notifications\MagicLoginLink; | |
| use Grosv\LaravelPasswordlessLogin\PasswordlessLogin; | |
| // In the model class, add the following methods: | |
| public function sendMagicLoginLinkNotification(): void | |
| { | |
| $this->notify(new MagicLoginLink($this->getMagicLoginLink())); |