Installation
NPM Package
npm install @omnitend/dashboard-for-laravel
Composer Package
Install the PHP helpers:
composer require omnitend/dashboard-for-laravel
Import Styles
Import the built CSS once in your app entry (e.g., resources/js/app.ts or main.ts):
// resources/js/app.ts
import '@omnitend/dashboard-for-laravel/theme.css'
This ships Bootstrap styles plus component styles in one bundle.
Import Components
Import components as needed:
import { DButton, DCard, useForm } from '@omnitend/dashboard-for-laravel'
Or import everything:
import * as Dashboard from '@omnitend/dashboard-for-laravel'
TypeScript Support
The library includes full TypeScript declarations. Types are automatically available when you import components.
import type { FieldDefinition, UseFormReturn } from '@omnitend/dashboard-for-laravel'
Laravel Integration
Register Service Provider
The service provider is auto-discovered, but you can manually register it in config/app.php:
'providers' => [
// ...
OmniTend\LaravelDashboard\LaravelDashboardServiceProvider::class,
],
Use PHP Utilities
use OmniTend\LaravelDashboard\Http\Requests\BaseFormRequest;
use OmniTend\LaravelDashboard\Traits\HasApiResponses;
class UserController extends Controller
{
use HasApiResponses;
public function store(CreateUserRequest $request)
{
$user = User::create($request->validated());
return $this->success($user, 'User created successfully');
}
}
Verifying Installation
After importing the CSS in your entry file, create a component to verify everything works:
<script setup lang="ts">
import { DButton } from '@omnitend/dashboard-for-laravel'
</script>
<template>
<DButton variant="primary">
It works!
</DButton>
</template>
If you see a styled blue button, you’re all set.
Next Steps
- Getting Started Guide - Learn core concepts
- Theming Guide - Customise the theme
- Component Reference - Browse available components
- Contributing Guide - Development setup and contributing