Download the PHP package chat-agency/laravel-backend-component without Composer
On this page you can find all versions of the php package chat-agency/laravel-backend-component. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download chat-agency/laravel-backend-component
More information about chat-agency/laravel-backend-component
Files in chat-agency/laravel-backend-component
Package laravel-backend-component
Short Description Use Laravel component using php classes
License MIT
Homepage https://github.com/chat-agency/laravel-backend-component
Informations about the package laravel-backend-component
Laravel Backend Component
A package that simplifies the creation of dynamic, class-based Laravel components.
This package allows you to build complex, reusable UI components in PHP, making your backend and frontend integration seamless.
Install the package via Composer:
To use the package’s Tailwind themes, configure Tailwind to scan the package's Blade files. The method differs slightly between Tailwind versions:
Tailwind CSS v3:
Add the package's view path to the content array in your tailwind.config.js file:
Tailwind CSS v4:
In your main CSS file (e.g., resources/css/app.css), use the @source at-rule to include the package's view path:
Basic use
Use the MainBackendComponent class to construct your component. Pass the component name/path as the first parameter:
Alternatively, builders and an enum are available to streamline instance creation:
Since the main component class implements Laravel’s Htmlable interface, you can output the component using simple Blade syntax—no escaping needed:
Components can be composed with other components:
Theming
The package supports theming, primarily designed for use with Tailwind CSS classes. All themes are stored inside resources/views/_themes/tailwind by default, ensuring they are automatically discovered by Tailwind's scanner.
You can apply a theme using the setTheme method:
Tests
Run tests using Composer:
If you're submitting a pull request, use the qa command—it runs phpstan, pint, and tests. These are the same checks performed in GitHub Actions
License
This package is licensed under the MIT License.
All versions of laravel-backend-component with dependencies
illuminate/contracts Version ^10.0||^11.0||^12.0
spatie/laravel-package-tools Version ^1.16