Skip to content

Instantly share code, notes, and snippets.

View Saifallak's full-sized avatar
🤓
Debugging

Saif Allah Khaled Saifallak

🤓
Debugging
View GitHub Profile
@nathandaly
nathandaly / BaseResource.php
Last active April 28, 2024 23:37
Tenancy for Laravel & Filament V3 (Tenant per database)
<?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;
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Spatie\Image\Image;
use Spatie\Image\Manipulations;
use Symfony\Component\HttpFoundation\File\UploadedFile;
@Z3d0X
Z3d0X / FilamentQuickStart.php
Created April 8, 2022 19:34
Quickly install and configure filament in a new laravel project
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Filesystem\Filesystem;
class FilamentQuickStart extends Command
{
protected $signature = 'filament:quickstart';
@sawirricardo
sawirricardo / laravel-command-package.txt
Last active April 4, 2024 06:09
Laravel almost must use commands and packages
php artisan storage:link;
php artisan make:notifications-table
composer require laravel/horizon laravel/folio \
livewire/volt \
tpetry/laravel-postgresql-enhanced \
spatie/laravel-tags spatie/laravel-sluggable \
spatie/laravel-medialibrary spatie/laravel-activitylog \
wnx/laravel-backup-restore \
spatie/laravel-model-info spatie/laravel-sql-commenter \
@codediodeio
codediodeio / database.rules.json
Last active January 28, 2024 19:07
Common Database Rules for Firebase
// No Security
{
"rules": {
".read": true,
".write": true
}
}
@homaily
homaily / gist:8672499
Last active April 15, 2024 05:57
Regex to validate saudi mobile numbers

السلام عليكم ، هذا كود ريجيكس بسيط للتحقق من صحة أرقام الجوالات السعودية ، يقوم الريجيكس بالتحقق من مفتاح الدولة ، مفتاح شركة الإتصالات لضمان صحة النص المدخل .

Hello, this is a simple regex to validate saudi mobile numbers, the code will validate country code, telecome company code and make sure the tested sting is correct .

/^(009665|9665|\+9665|05|5)(5|0|3|6|4|9|1|8|7)([0-9]{7})$/

Regex Breakdown - شرح الكود