jeffreyvanrossum / wp-views
A package that allows you to easily fetch view files and pass arguments along.
dev-main
2025-02-05 16:01 UTC
Requires
- php: ^8.0
Requires (Dev)
- laravel/pint: ^1.13
This package is auto-updated.
Last update: 2025-02-05 16:05:04 UTC
README
WP Views
Dead simple package that allows you to easily fetch view files and pass arguments along.
Installation
composer require jeffreyvanrossum/wp-views
Usage
You can either create a class or helper function to access your view file.
function your_prefix_view(...$args) { return new WPViews('your-view-path')->render(...$args); }
Then after you can use it like so:
your_prefix_view('your-view', ['foo' => 'bar']);
Contributors
License
MIT. Please see the License File for more information.