performing / laravel-harmony
Headless inertia components
Installs: 740
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:Vue
Requires
- php: ^8.1
- illuminate/collections: ^10.0|^11.0
- illuminate/contracts: ^10.0|^11.0
- illuminate/support: ^10.0|^11.0
- inertiajs/inertia-laravel: ^0.6.10|^1.0
- laracasts/flash: ^3.2
- tightenco/ziggy: ^1.6|^2.0
Requires (Dev)
- calebporzio/sushi: ^2.4
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.8
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^8.11
- pestphp/pest: ^2.0
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- silber/bouncer: ^1.0
- spatie/laravel-data: ^3.9
- spatie/laravel-medialibrary: ^10.12
- spatie/laravel-package-tools: ^1.14.0
README
Collection of classes and vue components to speed your development of InertiaJs applications.
Installation
You can install the package via composer:
composer require performing/laravel-harmony
You can publish the config file with:
php artisan vendor:publish --tag="harmony-config"
Install npm dependencies:
npm install tailwindcss @headlessui/vue @popperjs/core @vueuse/core @zag-js/checkbox @zag-js/combobox @zag-js/popover @zag-js/toast @zag-js/vue
Update your vite configuraiton as follows:
import { defineConfig } from 'vite'; import path from 'node:path'; import laravel from 'laravel-vite-plugin'; import vue from '@vitejs/plugin-vue'; import Components from "unplugin-vue-components/vite"; export default defineConfig({ resolve: { alias: { '@': path.resolve(__dirname, 'resources/js'), '~': path.resolve(__dirname, 'vendor/performing/laravel-harmony/resources'), } }, plugins: [ Components({ dirs: [ // Add other paths before if you want to // ovverride components with same name 'vendor/performing/laravel-harmony/resources/components', ], extensions: ["vue"], }), // ... ] })
Update your tsconfig
{ "compilerOptions": { // ... "paths": { "~/*": ["./vendor/performing/laravel-harmony/resources/*"] } }, "include": [ "vendor/performing/laravel-harmony/resources/**/*" ] }
Usage
use Performing\Harmony\Page; use Performing\Harmony\Components\TableComponent; class ModelController { public function index() : Inertia\Response { return [ Page::make('Title') ->table( TableComponent::make() ->rows(Model::query()) ->columns([ ... ]) ->filters([ ... ]) ->selectable() ) ->render('harmony::resources/index') ] } }
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
License
The MIT License (MIT). Please see License File for more information.