This repo no longer includes the code for the Blade Directive.
It has moved here:
Proof of concept
Allows Blade Templates to render a PHP matching a Vue Component, and utilizing Vue Hydrate via server-rendered="true"
to mount jankless.
Once mounted, PHP rendered DOM is handled by Vue like normal.
Original concept came from reading this article by Anthony Gore
- Laravel Based Routes & Views
- Jankless Rendering of Vue Compoenents within Blade Templates.
- Conciously keeping php rendered & vue template state in sync while building
- Release lootmarket/LaravelVueComponent as a standalone blade directive.
- Vue Apps rendered static within a Laravel Blade Template.
- Jankless mounting into Vue.
- Write code 'once' (albeit, quite messy with ifs right now)
- Example utilizing Laravel Collections, and jankless rendering that state
- PHP feeds Initial state to Vuex
- Checkout Branch
composer install
npm install
npm run dev
php artisan serve
- Jankless Variable Loading (replaces VueX State on load)
- Capable of using child components
- Transitions (how can php set initial transition state to match vue state?)
-
Vue Routerno need, assumption here is laravel routing.