1. Go to this page and download the library: Download koamishin/koamistarterkit library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
koamishin / koamistarterkit example snippets
use App\Models\User;
use App\Notifications\YourNotification;
$user->notify(new YourNotification());
public function via(object $notifiable): array
{
return ['database'];
}
public function toArray(object $notifiable): array
{
return [
'title' => 'Notification Title',
'message' => 'Your notification message here',
'action_url' => '/optional-action-url',
];
}
use App\Enums\SocialLoginProvider;
use App\Settings\SocialLoginSettings;
$settings = app(SocialLoginSettings::class);
// Check if a provider is enabled
if ($settings->isProviderEnabled(SocialLoginProvider::Github)) {
// Show GitHub login button
}
// Resolve credentials (env wins over stored settings)
$creds = $settings->resolveCredentials(SocialLoginProvider::Google);
use App\Settings\ApplicationFeaturesSettings;
// Get settings instance
$settings = app(ApplicationFeaturesSettings::class);
// Access individual settings
if ($settings->registration_enabled) {
// Allow registration
}
// Update settings
$settings->auth_layout = 'card';
$settings->save();
class MyModulePlugin implements Plugin
{
public function register(Panel $panel): void
{
$panel->discoverResources(
in: __DIR__.'/Filament/Resources',
for: 'Modules\\MyModule\\Filament\\Resources',
);
}
}