maikealame / laravel-auto
Laravel 辅助工具,为您的项目几乎提供一切功能
1.1.3
2023-01-13 23:02 UTC
Requires
- php: >=5.5.9
- maikealame/auto-where: *
- dev-master
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.11
- 1.0.10
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5.5
- 1.0.5.4
- 1.0.5.3
- 1.0.5.2
- 1.0.5.1
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0
- 0.4.6.2
- 0.4.6.1
- 0.4.6
- 0.4.5.9
- 0.4.5.8
- 0.4.5.7
- 0.4.5.6
- 0.4.5.5
- 0.4.5.4
- 0.4.5.3
- 0.4.5.2
- 0.4.5.1
- 0.4.5
- 0.4.4.4
- 0.4.4.3
- 0.4.4.2
- 0.4.4.1
- 0.4.4
- 0.4.3
- 0.4.2
- 0.4.1
- 0.4
- 0.3.16
- 0.3.15
- 0.3.14
- 0.3.13
- 0.3.12
- 0.3.11
- 0.3.10
- 0.3.9
- 0.3.8
- 0.3.7
- 0.3.6
- 0.3.5
- 0.3.4
- 0.3.3
- 0.3.2
- 0.3.1
- 0.3
- 0.2.3
- 0.2.2
- 0.2.1
- 0.2
- 0.1.1
- 0.1
This package is auto-updated.
Last update: 2024-09-14 02:48:15 UTC
README

Laravel Auto
Laravel 辅助包,提供与其他任何工具相比都更为自动化的列表功能,包括筛选、排序和分页。
Wiki: https://maikealame.github.io/laravel-auto/
您可以根据需要创建自己的布局和样式,不包括任何布局的 HTML/CSS!
此包仅提供 Eloquent 中非常自动化的查询,并使用 Blade 指令。
您可以使用它而不使用 Blade 指令,例如 Vue.js 和 React,但需要手动实现后端调用和布局渲染。
$categories = Topic::from("topics as t")
->select("t.*")
->leftJoin("portals as p", "p.id","=","t.portal_id")
->autoWhere()->autoSort()->autoPaginate();
if (Request::has("filter")) {
if (isset(Request::get("filter")['keyword'])) {
$keyword = Request::get("filter")['keyword'];
Auto::setField("notifications.title", $keyword);
Auto::setField("notifications.description", $keyword);
}
}
$notifications = Notification::select("notifications.*", "notification_users.readed_at")
->groupBy("notifications.id")
->leftJoin("notifications_users", "notifications.id", "=", "notifications_users.notification_id")
->leftJoin("notifications_roles", "notifications.id", "=", "notifications_roles.notification_id")
->leftJoin("notifications_departments", "notifications.id", "=", "notifications_departments.notification_id")
->autoWhere(['or' => ["notifications.title", "notifications.description"]])
->autoSort(["notifications.updated_at", "desc"])->autoPaginate();
$enterprises = Enterprises::from("enterprises as e"))
->select("e.*")
->leftJoin("enterprise_indicators_enterprises as iei","eie.enterprise_id","=","e.id")
->groupBy("e.id")
->autoWhere()->autoSort()->autoPaginate();