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.
A list of open-source packages we maintain. Click on a package to go the the docs to view full installation and usage information.
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
composer require libaro/bread
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 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
).
const path = require('path')
module.exports = {
optimization: {
minimize: false,
},
resolve: {
alias: {
'@bread': path.resolve('Bread/Resources')
}
}
}
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
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please see DEVELOPMENT FLOW for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.