dejwcake/craftable
Composer 安装命令:
composer require dejwcake/craftable
包简介
Administration toolkit for Laravel - starting point for developing administration interface
README 文档
README
About
Hi Crafter, welcome to the official documentation for Craftable – a Laravel-based open‑source toolkit for building administration interfaces. It’s a minimal admin template and a starting point for developing back‑office systems, intranets, or CMS‑like systems.
This package is forked from BRACKETS-by-TRIAD/craftable and is continuously maintained.
You could call it a CMS, but it’s a very slim one, with as little content to manage as possible. It has:
- Admin UI based on CoreUI (http://coreui.io/)
- CRUD generator
- Authentication, profile, and users CRUD
- Translations manager
- Other helpers to quickly bootstrap your new administration area (Media Library, Admin Listing, etc.)
Demo
Try the live demo at https://demo.getcraftable.com.
Use these credentials to sign in:
- email:
demo@getcraftable.com - password:
demo123
You can see an administration of:
- Posts - this is the standard CRUD generated with the
admin-generatorpackage - Translatable Articles - this is the showcase for
translatableEloquent models - Manage access - this is an extended CRUD for managing users (your existing Eloquent model)
- Translations - where you can manage the translations stored in the database
Made of components
Our intent was to split all the stuff into several packages with as few dependencies as possible. This is what we're coming with at the moment:
- Admin UI - admin template (CoreUI assets, Blade views, Vue components)
- Admin Generator - CRUD generator for Eloquent models
- Admin Authentication - ability to authenticate into Admin area
- Translatable - ability to have translatable content (extending Laravel's default Localization)
- Admin Listing - ability to quickly build a query for administration listing for your Eloquent models
- Media Library - ability to attach media to Eloquent models
- Admin Translations - translation manager (with UI)
Craftable uses all the packages above. It also uses some other 3rd party packages (like Spatie's spatie/laravel-permission) and provides some basic default configuration to speed up development of a typical administration interface.
Requirements
Craftable requires:
- PHP 8.5+
- Supported databases:
- MariaDB 12.1+
- PostgreSQL 18+
- npm 5.3+
- Node.js 8.4+
Craftable is built on Laravel, so you should check out its requirements too. It is compatible with Laravel 13:
Installation
New Craftable project
First you need to have a Laravel application, so follow the Laravel installation guide: https://laravel.com/docs/13.x/installation
Create an empty database of your choice (PostgreSQL or MySQL).
Now require these two main packages:
composer require dejwcake/craftable composer require --dev dejwcake/admin-generator
Add Craftable to existing project
Alternatively, you can use your existing Laravel application. Start by requiring these two main packages:
composer require dejwcake/craftable composer require --dev dejwcake/admin-generator
Package installation
To install Craftable, run:
php artisan craftable:install
This is going to install all dependencies, publish all important vendor configs, migrate, set up some configs, configure webpack, and run migrations.
The command is going to generate and print the password for the default administrator account. Save this password to your clipboard, we are going to need it soon.
Basics
Once installed, navigate your browser to /admin/login. You should be able to see a login screen.
Use these credentials to log in:
- Email:
admin@getcraftable.com - Password: use the password from your clipboard (it was printed at the end of the
craftable:installcommand)
After logging in you should be able to see a default homepage and two menu items:
- Manage access
- Translations
Documentation
You can find full documentation for this package and other packages Craftable uses at https://docs.getcraftable.com/#/craftable.
Where to go next?
At this point you are ready to start building your administration area. You probably want to start building a typical CRUD interface for your Eloquent models. You should definitely check our Admin Generator documentation.
In case you rather want to create some atypical custom made administration, then you probably want to head over to Admin UI package.
Have fun and craft something awesome!
How to contribute
-
Drop a ⭐ on the GitHub repository (optional)
-
Before contributing, please read CONTRIBUTING.md and CODE_OF_CONDUCT.md.
-
Create an issue for the project or a feature you would like to add to the project, and get the task assigned to yourself. (Issues can be any bug fixes or features you want to add to this project.)
-
Fork the repo to your GitHub account.
-
Clone the repo to a local folder on your machine by using this command with your forked repository link in place of the URL below:
git clone https://github.com/dejwcake/craftable -
Create a branch using the command below.
git branch <your-branch-name> -
Check out your branch.
git checkout <your-branch-name> -
Add your code in your local machine folder.
git add . -
Commit your changes.
git commit -m "<add your message here>" -
Push your changes.
git push --set-upstream origin <your-branch-name> -
Open a pull request (compare your branch with the owner
mainbranch).
Contributors 🌟
Kudos to these amazing people
Licence
MIT Licence. Refer to the LICENSE file to get more info.
How to develop this project
Composer
Update dependencies:
docker compose run -it --rm test composer update
Composer normalization:
docker compose run -it --rm php-qa composer normalize
Run tests
Run tests with pcov:
docker compose run -it --rm test ./vendor/bin/phpunit -d pcov.enabled=1
To regenerate snapshots use:
docker compose run -it --rm test ./vendor/bin/phpunit -d pcov.enabled=1 -d --update-snapshots
To switch between postgresql and mariadb change in docker-compose.yml DB_CONNECTION environmental variable:
- DB_CONNECTION: pgsql
+ DB_CONNECTION: mysql
Run code analysis tools (php-qa)
PHP compatibility:
docker compose run -it --rm php-qa phpcs --standard=.phpcs.compatibility.xml --cache=.phpcs.cache
Code style:
docker compose run -it --rm php-qa phpcs -s --colors --extensions=php
Fix style issues:
docker compose run -it --rm php-qa phpcbf -s --colors --extensions=php
Static analysis (phpstan):
docker compose run -it --rm php-qa phpstan analyse --configuration=phpstan.neon
Mess detector (phpmd):
docker compose run -it --rm php-qa phpmd ./database,./resources,./src,./tests ansi phpmd.xml --suffixes php --baseline-file phpmd.baseline.xml
dejwcake/craftable 适用场景与选型建议
dejwcake/craftable 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 716 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 05 月 06 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「framework」 「admin」 「toolkit」 「cms」 「crud」 「laravel」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 dejwcake/craftable 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 dejwcake/craftable 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 dejwcake/craftable 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
PHP Framework HLEB2 is the foundation of the web application. Provides ease of development and application performance.
2lenet/EasyAdminPlusBundle
Analysis module for finding problematical shop data.
Symfony2 Bundle that adds basic user account entity and city/state/country setup as well
Common helpers and classes for ICanBoogie
Enable use of agile toolkit framework in wordpress
统计信息
- 总下载量: 716
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 21
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-05-06