PHP code example of rawand201 / filament-kurdish-calendar

1. Go to this page and download the library: Download rawand201/filament-kurdish-calendar 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/ */

    

rawand201 / filament-kurdish-calendar example snippets


use Filament\Tables\Columns\TextColumn;

TextColumn::make('created_at')->kurdishDate();
TextColumn::make('updated_at')->kurdishDateTime();

use Filament\Infolists\Components\TextEntry;

TextEntry::make('created_at')->kurdishDate();
TextEntry::make('updated_at')->kurdishDateTime();

use Entensy\FilamentKurdishCalendar\Forms\Components\KurdishDatePicker;

KurdishDatePicker::make('birth_date');

TextColumn::make('created_at')->kurdishDate('j F Y');

use Entensy\FilamentKurdishCalendar\Support\KurdishCalendarConverter;
use Entensy\FilamentKurdishCalendar\Support\KurdishCalendarFormatter;
use Illuminate\Support\Carbon;

$parts = KurdishCalendarConverter::fromGregorian(Carbon::now());
$gregorian = KurdishCalendarConverter::toGregorian($parts['year'], $parts['month'], $parts['day']);
$label = KurdishCalendarFormatter::format(Carbon::now(), 'Y/m/d H:i');

return [
    // null = use app.timezone
    'timezone' => null,

    // Default display formats (Kurdish tokens + optional clock tokens)
    'default_date_format' => 'Y/m/d',
    'default_datetime_format' => 'Y/m/d H:i',

    // null = use app locale
    'translation_locale' => null,

    // Flatpickr locale used by the picker UI
    'picker_locale' => 'ckb_IQ',
];
bash
php artisan vendor:publish --tag=filament-kurdish-calendar-config
bash
php artisan vendor:publish --tag=filament-kurdish-calendar-translations
bash
php artisan vendor:publish --tag=filament-kurdish-calendar-views
bash
php artisan optimize:clear