libaro / bread
Bread
Installs: 40
Dependents: 0
Suggesters: 0
Security: 0
Stars: 8
Watchers: 2
Forks: 1
Open Issues: 5
Language:Vue
Requires
- php: ^7.4|^8.0
Requires (Dev)
- inertiajs/inertia-laravel: ^0.5.4
- nunomaduro/larastan: ^2.0
- orchestra/testbench: ^v7.5.0
- pestphp/pest: ^1.10
- pestphp/pest-plugin-laravel: ^1.1
- dev-main
- 1.5.3
- 1.5.2
- 1.5.1
- 1.5
- 1.4.0
- 1.3.1
- 1.3.0
- 1.2
- 1.1.1
- 1.0.1
- 1.0.0
- dev-dependabot/github_actions/stefanzweifel/git-auto-commit-action-5
- dev-dependabot/github_actions/actions/checkout-4
- dev-dependabot/github_actions/ramsey/composer-install-2
- dev-feature/phpstan-level
- dev-feature/vite-support
- dev-develop
- dev-feature/larastan
This package is auto-updated.
Last update: 2024-11-09 23:01:10 UTC
README
What is Bread?
Bread stands for Browse, Read, Edit, Add and Delete. It allows the developer to rapidly create CRUD applications, simply by describing which fields to use.
The full documentation is installed with the package under /docs
Bread is a Laravel package to be used in combination with Inertia, Tailwind and Vue. So be sure to have these installed and configured.
Installation
composer require libaro/bread
Publish resource files
Run following command to publish the javascript files needed to render the index and form pages.
php artisan vendor:publish --tag=bread --force
This will add the following to your project:
/Bread
/Resources
/js
/ui
You can customize the published files and add your own components in the Bread/Resources
directory.
Update your inertia app
Update your inertia app to include the following:
createInertiaApp({ resolve: (name) => { const [domain, path] = name.split('::') let page = null if (domain === 'Bread') { page = require(`./../../../Bread/Resources/ui/Pages/${path}.vue`).default } else { page = require(`./../../../resources/admin/ui/Pages/${domain}/${path}.vue`).default } page.layout ??= Backend return page }, ... })
This allows the use of {domain}::{page}
when calling an Inertia Page (e.g.: Bread::Index
).
Add the '@bread' alias to your webpack config file
const path = require('path') module.exports = { optimization: { minimize: false, }, resolve: { alias: { '@bread': path.resolve('Bread/Resources') } } }
Dependencies
Bread requires the following dependencies, be sure to install these in your project:
npm install -D tailwindcss@^3.1 postcss autoprefixer vue@^3.2 @inertiajs/inertia@^0.11.0 @inertiajs/inertia-vue3@^0.6.0 unplugin-vue-define-options@^0.6.1 @tailwindcss/forms@^0.4.0 @headlessui/vue@^1.6 pinia@^2.0.0 uuid@^8.3.2 luxon@^2.4.0
composer require tightenco/ziggy
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Development Flow
Please see DEVELOPMENT FLOW for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.