Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maikealame/laravel-auto
Laravel Auto - a helper package to make automated lists with filters, sorting and paging like no other
https://github.com/maikealame/laravel-auto
laravel mysql pagination php postgresql sort table where
Last synced: 1 day ago
JSON representation
Laravel Auto - a helper package to make automated lists with filters, sorting and paging like no other
- Host: GitHub
- URL: https://github.com/maikealame/laravel-auto
- Owner: maikealame
- License: mit
- Created: 2017-05-09T14:28:28.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-13T23:03:34.000Z (almost 2 years ago)
- Last Synced: 2024-09-24T20:11:46.150Z (about 1 month ago)
- Topics: laravel, mysql, pagination, php, postgresql, sort, table, where
- Language: PHP
- Homepage: https://maikealame.github.io/laravel-auto/
- Size: 6.36 MB
- Stars: 42
- Watchers: 5
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Laravel helper package to make automated lists with filters, sorting and paging like no other.
Wiki: [https://maikealame.github.io/laravel-auto/](https://maikealame.github.io/laravel-auto/)
[![Latest Version](https://img.shields.io/github/release/maikealame/laravel-auto.svg?style=flat-square)](https://github.com/maikealame/laravel-auto/releases)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
[![Total Downloads](https://img.shields.io/packagist/dt/maikealame/laravel-auto.svg?style=flat-square)](https://packagist.org/packages/maikealame/laravel-auto)---
**You are free to create your own layout and style, there's no layout html/css included !**
**This package only grants a very automated query in Eloquent with Blade directives.**
You can use it either without Blade directives, like Vue.js and React, but you need to implement manually the calls to backend and layout rendering.
---
![table image](https://raw.githubusercontent.com/maikealame/laravel-auto/master/docs/images/examples/1.png)
---
![table image](https://raw.githubusercontent.com/maikealame/laravel-auto/master/docs/images/examples/2.png)
---
```
$categories = Topic::from("topics as t")
->select("t.*")
->leftJoin("portals as p", "p.id","=","t.portal_id")
->autoWhere()->autoSort()->autoPaginate();
```![table image](https://raw.githubusercontent.com/maikealame/laravel-auto/master/docs/images/examples/3.png)
---
![table image](https://raw.githubusercontent.com/maikealame/laravel-auto/master/docs/images/examples/4.png)
---
```
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();
```![table image](https://raw.githubusercontent.com/maikealame/laravel-auto/master/docs/images/examples/5.png)
---
```
$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();
```![table image](https://raw.githubusercontent.com/maikealame/laravel-auto/master/docs/images/examples/6.png)
---
See https://maikealame.github.io/laravel-auto/
---
- [Features](https://maikealame.github.io/laravel-auto#features)
- [What it do](https://maikealame.github.io/laravel-auto#what-it-do)
- [What is necessary](https://maikealame.github.io/laravel-auto#what-is-necessary)
- [Wiki](https://maikealame.github.io/laravel-auto#wiki)
- [Examples](https://maikealame.github.io/laravel-auto#example)
- [How it works](https://maikealame.github.io/laravel-auto#how-works)
1. [View](https://maikealame.github.io/laravel-auto#view)
2. [Controller](https://maikealame.github.io/laravel-auto#controller)
3. [Model](https://maikealame.github.io/laravel-auto#model)
- [How to install](https://maikealame.github.io/laravel-auto#how-to-install)