public function boot(): void
{
// Observe the DatabaseNotification model for created events
DatabaseNotification::observe(new class {
// Listen to the created event
public function created(DatabaseNotification $notification): 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
<?php | |
use App\Events\MessageSent; | |
use Livewire\Volt\Component; | |
new class extends Component | |
{ | |
/** | |
* @var string[] | |
*/ |
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\Rules; | |
use Illuminate\Contracts\Validation\Rule; | |
class ImageMaliciousDetectionRule implements Rule | |
{ | |
protected $malicious_keywords = [ | |
'\\/bin\\/bash', |
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 | |
return [ | |
'bs' => 'Bosnian', | |
'ee_TG' => 'Ewe (Togo)', | |
'ms' => 'Malay', | |
'kam_KE' => 'Kamba (Kenya)', | |
'mt' => 'Maltese', | |
'ha' => 'Hausa', | |
'es_HN' => 'Spanish (Honduras)', |
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\Abilities; | |
use Illuminate\Support\Str; | |
use ReflectionClass; | |
/** | |
* Note: This is a preview of an upcoming package from Tighten. | |
**/ |
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 | |
$countries = array | |
( | |
'AF' => 'Afghanistan', | |
'AX' => 'Aland Islands', | |
'AL' => 'Albania', | |
'DZ' => 'Algeria', | |
'AS' => 'American Samoa', | |
'AD' => 'Andorra', |