### Install TiMEX Filament Plugin Source: https://github.com/buildix/timex/blob/1.1.0/docs/01-install.md This snippet provides the commands to install the TiMEX package via Composer and then run the artisan command to publish all necessary assets for the plugin to function correctly. Ensure PHP 8.0+, Laravel v8.0+, Livewire v2.0+, and Filament v2.0+ are met. ```bash composer require buildix/timex ``` ```bash php artisan timex:install ``` -------------------------------- ### Configure Week Start Day Source: https://github.com/buildix/timex/blob/1.1.0/docs/02-config.md Sets the starting day of the week for the calendar display. This can be adjusted using Carbon constants like `Carbon::MONDAY` or `Carbon::SUNDAY` to align with different locale conventions. ```PHP 'week' => [ 'start' => Carbon::MONDAY, ], ``` -------------------------------- ### Set Default Timex Navigation Icon Source: https://github.com/buildix/timex/blob/1.1.0/docs/03-page.md Specifies the default TiMEX icon to be used for the static icon on your navigation panel. You may change it to any other installed icon packages. ```php 'pages' => [ 'icon' => [ 'timex' => 'timex-timex', ], ``` -------------------------------- ### Configure TiMEX Modal Button Icon Name (PHP) Source: https://github.com/buildix/timex/blob/1.1.0/docs/04-buttons.md This setting specifies the name of the icon to be used for modal action buttons. The icon name should correspond to an icon available in any installed icon package, allowing for custom visual representation. ```php 'pages' => [ 'buttons' => [ 'modal' => [ 'submit' => [ 'icon' => [ 'name' => 'heroicon-o-save' ], ], ``` -------------------------------- ### Publish TiMEX Configuration Source: https://github.com/buildix/timex/blob/1.1.0/docs/01-install.md This command allows users to publish the default configuration file for the TiMEX plugin, enabling customization of its settings. This is useful for advanced configurations and overriding default behaviors. ```bash php artisan vendor:publish --tag=timex-config ``` -------------------------------- ### Full Timex Package Configuration Array Source: https://github.com/buildix/timex/blob/1.1.0/docs/02-config.md This comprehensive configuration array defines all customizable settings for the Buildix Timex package, including database table mappings, event and category properties, and various calendar display options. It serves as the central point for tailoring Timex functionality. ```PHP 'name' => 'name', 'id' => 'id', ], ], 'tables' => [ 'event' => [ 'name' => 'timex_events', ], 'category' => [ 'name' => 'timex_categories', ], ], /* |-------------------------------------------------------------------------- | TIMEX Event categories |-------------------------------------------------------------------------- | | Categories names are used to define colors & icons. | Each represents default tailwind colors. | You may change as you wish, just make sure your color have -500 / -600 and other variants | You may also go for a custom Category model to define your labels, colors and icons | */ 'categories' => [ 'isModelEnabled' => false, /* |-------------------------------------------------------------------------- | Category Model |-------------------------------------------------------------------------- | | You can define your custom Category model. | Minimum and default columns in your DB should be: id, value, icon, color. | | */ 'model' => [ 'class' => \Buildix\Timex\Models\Category::class, // \App\Models\Category::class 'key' => 'id', // "id" is a DB column - you can change by any primary key 'value' => 'value', // "value" is a DB column - it used for Select options and displays on Resource page 'icon' => 'icon', // "icon" is a DB column - define here any heroicon- icon 'color' => 'color', // "color" is a DB column - default tailwindcss colors names like: primary / secondary / danger ], /* |-------------------------------------------------------------------------- | Default TiMEX Categories |-------------------------------------------------------------------------- */ 'labels' => [ 'primary' => 'Primary category', 'secondary' => 'Secondary category', 'danger' => 'Danger category', 'success' => 'Success category', ], 'icons' => [ 'primary' => 'heroicon-o-clipboard', 'secondary' => 'heroicon-o-bookmark', 'danger' => 'heroicon-o-flag', 'success' => 'heroicon-o-badge-check', ], 'colors' => [ 'primary' => 'primary', 'secondary' => 'secondary', 'danger' => 'danger', 'success' => 'success', ], ], ]; ``` -------------------------------- ### Configure TiMEX Plugin Settings Source: https://github.com/buildix/timex/blob/1.1.0/docs/02-config.md This PHP configuration file defines various settings for the TiMEX plugin, including the icon prefix, mini-widget visibility, calendar week start/end days, day click behavior, and the integration of custom pages, resources, and models within Filament. It also specifies button icons and modal button configurations, allowing for extensive customization of the calendar interface and event management. ```php 'timex', /* |-------------------------------------------------------------------------- | TIMEX Mini widget |-------------------------------------------------------------------------- | | You can disable or enable individually widgets or entirely the whole view. | */ 'mini' => [ 'isMiniCalendarEnabled' => true, 'isDayViewHidden' => false, 'isNextMeetingViewHidden' => false, ], /* |-------------------------------------------------------------------------- | TIMEX Calendar configurations |-------------------------------------------------------------------------- | | Change according to your locale. | */ 'week' => [ 'start' => Carbon::MONDAY, 'end' => Carbon::SUNDAY ], 'isDayClickEnabled' => true, 'dayName' => 'minDayName', // minDayName or dayName or shortDayName 'dropDownCols' => 3, 'isPastCreationEnabled' => false, /* |-------------------------------------------------------------------------- | TIMEX Resources & Pages |-------------------------------------------------------------------------- | | By default TIMEX out of box will work, just make sure you make migration. | But you can also make your own Model and Filament resource and update config accordingly | */ 'pages' => [ 'timex' => \Buildix\Timex\Pages\Timex::class, 'slug' => 'timex', 'group' => 'timex', 'sort' => 0, 'shouldRegisterNavigation' => true, 'enablePolicy' => false, 'modalWidth' => 'xl', 'icon' => [ 'static' => true, 'timex' => 'timex-timex', 'day' => 'timex-day-' ], 'label' => [ 'navigation' => [ 'static' => false, 'format' => 'dddd, D MMM', ], 'breadcrumbs' => [ 'static' => false, 'format' => 'dddd, D MMM', ], 'title' => [ 'static' => false, 'format' => 'dddd, D MMM', ], ], 'buttons' => [ 'hideYearNavigation' => false, 'today' => [ 'static' => false, 'format' => 'D MMM' ], 'outlined' => true, 'icons' => [ 'previousYear' => 'heroicon-o-chevron-double-left', 'nextYear' => 'heroicon-o-chevron-double-right', 'previousMonth' => 'heroicon-o-chevron-left', 'nextMonth' => 'heroicon-o-chevron-right', 'createEvent' => 'heroicon-o-plus' ], 'modal' => [ 'submit' => [ 'outlined' => false, 'color' => 'primary', 'icon' => [ 'enabled' => true, 'name' => 'heroicon-o-save' ] ], 'cancel' => [ 'outlined' => false, 'color' => 'secondary', 'icon' => [ 'enabled' => true, 'name' => 'heroicon-o-x-circle' ] ], 'delete' => [ 'outlined' => false, 'color' => 'danger', 'icon' => [ 'enabled' => true, 'name' => 'heroicon-o-trash' ] ], 'edit' => [ 'outlined' => false, 'color' => 'primary', 'icon' => [ 'enabled' => true, 'name' => 'heroicon-o-pencil-alt' ] ], 'view' => [ 'time' => 'heroicon-o-clock', 'category' => 'heroicon-o-tag', 'body' => 'heroicon-o-annotation', 'participants' => 'heroicon-o-user-group' ] ] ] ], 'resources' => [ 'event' => \Buildix\Timex\Resources\EventResource::class, 'sort' => 1, 'icon' => 'heroicon-o-calendar', 'slug' => 'timex-events', 'shouldRegisterNavigation' => true, 'isStartEndHidden' => false ], 'models' => [ 'event' => \Buildix\Timex\Models\Event::class, 'users' => [ 'model' => \App\Models\User::class ] ] ]; ``` -------------------------------- ### Publish TiMEX Translations Source: https://github.com/buildix/timex/blob/1.1.0/docs/01-install.md This command publishes the language files for the TiMEX plugin, allowing developers to translate the package into different languages or customize existing translations. This is essential for internationalization. ```bash php artisan vendor:publish --tag=timex-translations ``` -------------------------------- ### Enable Mini Calendar Display Source: https://github.com/buildix/timex/blob/1.1.0/docs/02-config.md Controls the visibility of the mini-calendar, day view, and upcoming events widget on the page header. Setting this to `true` registers these components. ```PHP 'mini' => [ 'isMiniCalendarEnabled' => true, ``` -------------------------------- ### Configure Timex Filament Page Class Source: https://github.com/buildix/timex/blob/1.1.0/docs/03-page.md Sets the default Filament page class for Timex. Users can create their own Filament page and extend `Buildix\Timex::class` to override available methods on the parent page. ```php 'pages' => [ 'timex' => \Buildix\Timex\Pages\Timex::class, ``` -------------------------------- ### Enable Day Click for Event Creation Source: https://github.com/buildix/timex/blob/1.1.0/docs/02-config.md Allows users to create new events by clicking on a specific day on the calendar. When enabled, clicking a day will initiate the event creation process for that date. ```PHP 'isDayClickEnabled' => true, ``` -------------------------------- ### Configure TiMEX Category Labels, Icons, and Colors in PHP Source: https://github.com/buildix/timex/blob/1.1.0/docs/06-categories.md This configuration block defines the labels, icons, and colors for different types of TiMEX categories (e.g., primary, secondary, danger, success). It allows for extensive customization of how categories are displayed throughout the application, enhancing user experience and visual organization. ```php 'categories' => [ 'labels' => [ 'primary' => 'Primary category', 'secondary' => 'Secondary category', 'danger' => 'Danger category', 'success' => 'Success category', ], 'icons' => [ 'primary' => 'heroicon-o-clipboard', 'secondary' => 'heroicon-o-bookmark', 'danger' => 'heroicon-o-flag', 'success' => 'heroicon-o-badge-check', ], 'colors' => [ 'primary' => 'primary', 'secondary' => 'secondary', 'danger' => 'danger', 'success' => 'success', ], ], ``` -------------------------------- ### Format Week Day Names Source: https://github.com/buildix/timex/blob/1.1.0/docs/02-config.md Defines the display format for week day names on the calendar. Options include `dayName` (e.g., Monday), `shortDayName` (e.g., Mon), and `minDayName` (e.g., Mo) for varying levels of abbreviation. ```PHP 'dayName' => 'minDayName', ``` -------------------------------- ### Configure TiMEX Event Filament Resource Class Source: https://github.com/buildix/timex/blob/1.1.0/docs/05-resource.md Registers a custom Filament resource class for events, defaulting to `\Buildix\Timex\Resources\EventResource::class`. You can define your own resource and register it in `timex.php` to manage events. ```php 'resources' => [ 'event' => \Buildix\Timex\Resources\EventResource::class, ], ``` -------------------------------- ### Enable Past Event Creation/Movement Source: https://github.com/buildix/timex/blob/1.1.0/docs/02-config.md Controls whether users are permitted to create new events or move existing events to past dates. Setting this to `true` allows manipulation of events in historical timeframes. ```PHP 'isPastCreationEnabled' => false, ``` -------------------------------- ### Enable Laravel Policy for Timex Access Control Source: https://github.com/buildix/timex/blob/1.1.0/docs/03-page.md Activates Laravel policies for controlling access to the TiMEX page and resource. If `true`, the `shouldRegisterNavigation` option will be ignored, and access will be configured in accordance with your Laravel policies made for the TiMEX event model. ```php 'pages' => [ 'enablePolicy' => false, ``` -------------------------------- ### Configure TiMEX Resource Page URL Slug Source: https://github.com/buildix/timex/blob/1.1.0/docs/05-resource.md Defines the URL slug for the TiMEX resource page. The default slug is `timex-events`. ```php 'resources' => [ 'slug' => 'timex-events', ], ``` -------------------------------- ### Configure Static Timex Navigation Label Source: https://github.com/buildix/timex/blob/1.1.0/docs/03-page.md If `true`, the navigation label will be changed from the current day label to a static label stated in `lang/timex.php`. ```php 'pages' => [ 'label' => [ 'navigation' => [ 'static' => false, ], ``` -------------------------------- ### Configure Static Timex Navigation Icon Source: https://github.com/buildix/timex/blob/1.1.0/docs/03-page.md Determines whether the default TiMEX icon will be used on the navigation panel. If `true`, the default static icon is used; if `false`, a dynamic icon for the day will be used instead. ```php 'pages' => [ 'icon' => [ 'static' => true, ], ``` -------------------------------- ### Format Timex Navigation Label with Carbon Source: https://github.com/buildix/timex/blob/1.1.0/docs/03-page.md Allows customization of how the navigation label is displayed in accordance with Carbon formats. This formatting also applies to breadcrumbs and the page title. ```php 'pages' => [ 'label' => [ 'navigation' => [ 'format' => 'dddd, D MMM', ], ``` -------------------------------- ### Enable/Disable Timex Navigation Registration Source: https://github.com/buildix/timex/blob/1.1.0/docs/03-page.md Controls whether the TiMEX page and TiMEX filament resource will be registered on your navigation panel. If set to `true`, they will be registered. ```php 'pages' => [ 'shouldRegisterNavigation' => true, ``` -------------------------------- ### Configure TiMEX User Laravel Model and Fields Source: https://github.com/buildix/timex/blob/1.1.0/docs/05-resource.md Defines the Laravel model for users, including the model class, and the `name` and `id` fields to be used. Defaults to `\App\Models\User::class`. ```php 'models' => [ 'users' => [ 'model' => \App\Models\User::class, 'name' => 'name', 'id' => 'id', ], ], ``` -------------------------------- ### Define TiMEX Filament Navigation Icon Source: https://github.com/buildix/timex/blob/1.1.0/docs/05-resource.md Specifies the string value for the Filament navigation icon used by TiMEX resources. Defaults to `heroicon-o-calendar`. ```php 'resources' => [ 'icon' => 'heroicon-o-calendar', ], ``` -------------------------------- ### Set Filament Navigation Group Sorting for Timex Source: https://github.com/buildix/timex/blob/1.1.0/docs/03-page.md Determines the sorting order for the Timex Filament group navigation. ```php 'pages' => [ 'sort' => 0, ``` -------------------------------- ### Control TiMEX Filament Resource Navigation Registration Source: https://github.com/buildix/timex/blob/1.1.0/docs/05-resource.md Determines if the TiMEX Filament resource is registered on the navigation panel (default: `true`). If `enablePolicy` is `true`, this setting is ignored, and access is policy-driven. ```php 'resources' => [ 'shouldRegisterNavigation' => true, ], ``` -------------------------------- ### Configure TiMEX Navigation Buttons Style (PHP) Source: https://github.com/buildix/timex/blob/1.1.0/docs/04-buttons.md This setting controls the visual style of the buttons in the TiMEX page's navigation panel. When `true` (default), buttons will be 'outlined'; setting it to `false` will make them 'filled'. ```php 'pages' => [ 'buttons' => [ 'outlined' => true, ``` -------------------------------- ### Configure Year/Month Dropdown Columns Source: https://github.com/buildix/timex/blob/1.1.0/docs/02-config.md Adjusts the number of columns used in the grid layout for the year and month dropdown views. The default value is 3, but it can be changed to optimize display based on preference. ```PHP 'dropDownCols' => 3, ``` -------------------------------- ### Configure TiMEX Today Button Label Format (PHP) Source: https://github.com/buildix/timex/blob/1.1.0/docs/04-buttons.md This setting allows customization of the 'today' button's label display format. The format string should adhere to Carbon date formatting standards, enabling flexible date representation. ```php 'pages' => [ 'buttons' => [ 'today' => [ 'format' => 'D MMM' ], ``` -------------------------------- ### Hide Day View in Mini Calendar Source: https://github.com/buildix/timex/blob/1.1.0/docs/02-config.md Determines whether the day view component within the mini-calendar header should be hidden. If set to `true`, the day view will not be displayed. ```PHP 'mini' => [ 'isDayViewHidden' => false, ``` -------------------------------- ### Configure TiMEX Navigation Button Icons (PHP) Source: https://github.com/buildix/timex/blob/1.1.0/docs/04-buttons.md This configuration defines the default icon set for various navigation buttons within TiMEX. Each key corresponds to a specific button action (e.g., `previousYear`), and its value is the name of the icon to be used, typically from a heroicon set. ```php 'pages' => [ 'icons' => [ 'previousYear' => 'heroicon-o-chevron-double-left', 'nextYear' => 'heroicon-o-chevron-double-right', 'previousMonth' => 'heroicon-o-chevron-left', 'nextMonth' => 'heroicon-o-chevron-right', 'createEvent' => 'heroicon-o-plus' ], ``` -------------------------------- ### Configure TiMEX Today Button Static Label (PHP) Source: https://github.com/buildix/timex/blob/1.1.0/docs/04-buttons.md This setting determines if the label for the current day button should be static. When `true`, the label will be fixed in accordance with the `lang/timex.php` localization file, preventing dynamic updates. ```php 'pages' => [ 'buttons' => [ 'today' => [ 'static' => false, ], ``` -------------------------------- ### Hide Upcoming Events Widget Source: https://github.com/buildix/timex/blob/1.1.0/docs/02-config.md Controls the visibility of the upcoming events widget on the page header. Setting this to `true` will hide the widget from display. ```PHP 'mini' => [ 'isNextMeetingViewHidden' => false, ], ``` -------------------------------- ### Define Filament Navigation Group for Timex Source: https://github.com/buildix/timex/blob/1.1.0/docs/03-page.md Specifies the Filament navigation group item for Timex. You may change it to whatever you want in order to group your navigation items as you wish. ```php 'pages' => [ 'group' => 'timex', ``` -------------------------------- ### Configure TiMEX Category Model Enablement in PHP Source: https://github.com/buildix/timex/blob/1.1.0/docs/06-categories.md This configuration snippet sets whether a Laravel model should be used for TiMEX event categories. When set to `true`, the system will utilize a dedicated model for category management, allowing for more advanced features. ```php 'categories' => [ 'isModelEnabled' => false, ``` -------------------------------- ### Configure TiMEX Event Laravel Model Class Source: https://github.com/buildix/timex/blob/1.1.0/docs/05-resource.md Registers a custom Laravel model for events, defaulting to `\Buildix\Timex\Models\Event::class`. You can define your own model and register it in `timex.php` to store events. ```php 'models' => [ 'event' => \Buildix\Timex\Models\Event::class, ], ``` -------------------------------- ### Configure Week End Day Source: https://github.com/buildix/timex/blob/1.1.0/docs/02-config.md Sets the ending day of the week for the calendar display. This can be adjusted using Carbon constants like `Carbon::SUNDAY` or `Carbon::SATURDAY` to align with different locale conventions. ```PHP 'week' => [ 'end' => Carbon::SUNDAY ], ``` -------------------------------- ### Set Timex Calendar Page URL Slug Source: https://github.com/buildix/timex/blob/1.1.0/docs/03-page.md Defines the URL slug for the Timex calendar page. This string is used to define the URL of your calendar page. ```php 'pages' => [ 'slug' => 'timex', ``` -------------------------------- ### Configure TiMEX Year Navigation Button Visibility (PHP) Source: https://github.com/buildix/timex/blob/1.1.0/docs/04-buttons.md This setting controls the visibility of the year navigation buttons in the TiMEX page's navigation bar. When set to `false` (default), these buttons are visible; setting it to `true` will hide them. ```php 'pages' => [ 'buttons' => [ 'hideYearNavigation' => false, ``` -------------------------------- ### Configure Timex Event Modal Width Source: https://github.com/buildix/timex/blob/1.1.0/docs/03-page.md Adjusts the width of the event creation, edit, and view modals on the TiMEX page. You may change the width from `xs` to `7xl`. ```php 'pages' => [ 'modalWidth' => 'xl', ``` -------------------------------- ### Set TiMEX Events Database Table Name Source: https://github.com/buildix/timex/blob/1.1.0/docs/05-resource.md Specifies the name of the database table for TiMEX events. Defaults to `timex_events`. This can be changed to fit your application's naming conventions. ```php 'tables' => [ 'event' => [ 'name' => 'timex_events', ], ], ``` -------------------------------- ### Set TiMEX Categories Database Table Name Source: https://github.com/buildix/timex/blob/1.1.0/docs/05-resource.md Specifies the name of the database table for TiMEX categories. Defaults to `timex_categories`. This can be changed to fit your application's naming conventions. ```php 'tables' => [ 'category' => [ 'name' => 'timex_categories', ], ], ``` -------------------------------- ### Define TiMEX Category Laravel Model Class in PHP Source: https://github.com/buildix/timex/blob/1.1.0/docs/06-categories.md This configuration defines the Laravel model class and its associated key-value fields for TiMEX event categories. It specifies the model class to be used, along with the database columns for the unique identifier ('key'), display value ('value'), icon, and color. ```php 'categories' => [ 'model' => [ 'class' => \Buildix\Timex\Models\Category::class, 'key' => 'id', 'value' => 'value', 'icon' => 'icon', 'color' => 'color', ``` -------------------------------- ### Configure TiMEX Modal Button Outlined Style (PHP) Source: https://github.com/buildix/timex/blob/1.1.0/docs/04-buttons.md This setting allows changing the styling of buttons within TiMEX modals, specifically for actions like 'submit', 'cancel', 'delete', and 'edit'. When `true`, the buttons will appear outlined; otherwise, they will be filled. ```php 'pages' => [ 'buttons' => [ 'modal' => [ 'submit' => [ 'outlined' => false, ], ``` -------------------------------- ### Configure TiMEX Modal Button Color (PHP) Source: https://github.com/buildix/timex/blob/1.1.0/docs/04-buttons.md This setting allows specifying the color scheme for modal action buttons, such as the 'submit' button. Available options include `primary`, `secondary`, and `danger`, affecting the button's visual emphasis. ```php 'pages' => [ 'buttons' => [ 'modal' => [ 'submit' => [ 'color' => 'primary', ], ``` -------------------------------- ### Hide Start/End Time Fields in TiMEX Forms Source: https://github.com/buildix/timex/blob/1.1.0/docs/05-resource.md Controls the visibility of `startTime` and `endTime` DateTimePickers in create/edit forms and their labels in calendar view. Set to `true` to hide them. ```php 'resources' => [ 'isStartEndHidden' => false, ], ``` -------------------------------- ### Set TiMEX Filament Navigation Item Sorting Source: https://github.com/buildix/timex/blob/1.1.0/docs/05-resource.md Sets the integer value for sorting the TiMEX Filament navigation item. The default value is `1`. ```php 'resources' => [ 'sort' => 1, ], ``` -------------------------------- ### Enable/Disable TiMEX Modal Button Icons (PHP) Source: https://github.com/buildix/timex/blob/1.1.0/docs/04-buttons.md This setting controls whether an icon is displayed alongside the text on modal action buttons. When `true` (default), icons will be enabled for buttons such as 'submit', enhancing visual cues. ```php 'pages' => [ 'buttons' => [ 'modal' => [ 'submit' => [ 'icon' => [ 'enabled' => true, ], ], ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.