Celerik\Ui\Adapters\Laravel
CelerikServiceProvider
final class Celerik\Ui\Adapters\Laravel\CelerikServiceProvider extends ServiceProvider
Auto-discovered through extra.laravel.providers in composer.json.
Blade: <x-celerik-assets /> and <x-celerik :component="$grid" /> Assets: php artisan vendor:publish --tag=celerik-assets elFinder assets (File Manager): php artisan vendor:publish --tag=celerik-elfinder
Methods
register
register(): voidboot
boot(): voidEloquentDataSource
final class Celerik\Ui\Adapters\Laravel\EloquentDataSource implements DataSourceInterface
Data source for an Eloquent or query builder, e.g. new EloquentDataSource(User::query()).
Models are serialized with toArray(), so $hidden attributes are never sent.
Methods
__construct
__construct(Builder|Builder $query, array $searchable = [])$searchable: Search fields used when the request does not specify any.
fetch
fetch(DataRequest $request): DataResultEloquentEventSource
final class Celerik\Ui\Adapters\Laravel\EloquentEventSource implements EventSourceInterface
Event source for an Eloquent or query builder, e.g. new EloquentEventSource(Meeting::query(), ['start' => 'starts_at', 'end' => 'ends_at']).
Only rows overlapping the requested range are queried. Dates are compared in the application time zone (PHP's default time zone, which Laravel sets from config/app.php).
When saving events, convert dates to that time zone first ($event->start->setTimezone(new DateTimeZone(config('app.timezone')))): Eloquent stores a date's wall-clock time and drops its UTC offset.
Methods
__construct
__construct(Builder|Builder $query, array $fields = [])between
between(DateRange $range): iterable