zhyu / packages
some tools for laravel
Installs: 1 381
Dependents: 5
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- php: >=7.2.5
- doctrine/dbal: ^2.1|^3.0
- illuminate/auth: ^6.0|^7.0|^8.0|^9.0|^10.0
- illuminate/config: ^6.0|^7.0|^8.0|^9.0|^10.0
- illuminate/database: ^6.0|^7.0|^8.0|^9.0|^10.0
- illuminate/support: ^6.0|^7.0|^8.0|^9.0|^10.0
- laravel/helpers: ^1.4
Requires (Dev)
- phpunit/phpunit: ^8.0
- 0.5.1.0
- 0.5.0.0
- 0.4.2.0
- 0.4.1.1
- 0.4.1.0
- 0.4.0.18
- 0.4.0.17
- 0.4.0.16
- 0.4.0.15
- 0.4.0.14
- 0.4.0.13
- 0.4.0.12
- 0.4.0.11
- 0.4.0.8
- 0.4.0.7
- 0.4.0.4
- 0.4.0.1
- 0.4.0.0
- 0.3.6.9
- 0.3.6.8
- 0.3.6.7
- 0.3.6.6
- 0.3.6.5
- 0.3.6.3
- 0.3.6.2
- 0.3.6.0
- 0.3.5.8
- 0.3.5.7
- 0.3.5.6
- 0.3.5.5
- 0.3.5.4
- 0.3.5.1
- 0.3.5.0
- 0.3.4.9
- 0.3.4.8
- 0.3.4.7
- 0.3.4.6
- 0.3.4.4
- 0.3.4.3
- 0.3.4.2
- 0.3.3.8
- 0.3.3.7
- 0.3.3.5
- 0.3.3.4
- 0.3.3.3
- 0.3.3.2
- 0.3.3.1
- 0.3.3.0
- 0.3.2.4
- 0.3.2.3
- 0.3.2.2
- 0.3.2.0
- 0.3.1.9
- 0.3.1.8
- 0.3.1.7
- 0.3.1.6
- 0.3.1.5
- 0.3.1.4
- 0.3.1.3
- 0.3.1.2
- 0.3.1.1
- v0.3.0.x-dev
- 0.3.0.4
- 0.3.0.3
- 0.3.0.2
- 0.3.0.1
- 0.3.0.0
- 0.2.6.2
- 0.2.6.1
- 0.2.6
- dev-master / 0.2.5.x-dev
- 0.2.5
- dev-version/4
This package is auto-updated.
Last update: 2025-03-15 03:58:26 UTC
README
First: How to install? 1.composer require zhyu/packages 2.php artisan vendor:publish --tag=zhyu --force 3.php artisan migrate 4.create fllow config in .env file #---super admin to manage resources ZHYU_ADMIN_USER_IDS=1 5.Register alias in config/app.php 'ZhyuGate' => Zhyu\Facades\ZhyuGate::class, 6.append these lines in app\Providers\AuthServiceProvider.php boot method ZhyuGate::init(); 7.make usergroup model in \App folder Second: Rules 1.datatable ajax url parameters rules /ajax/{model}-{key}/{limit?}?query=UserName#=#david*UserPhone#=#0233223333 ?query=parent_id#=#0 ?query=parent_id#whereNull Others: 1.create reoureces route /resources 2.In Contorller you can create these function to validate or filter request rules() rules_create() rules_edit() filter() filter_create() filter_edit() Commands: 1.repository php artisan make:repository {repository} --m={model} 2.resource php artisan make:res {name} {--route=} {--m=} 3.resource collection php artisan make:rcollection {name} 4.datatable php artisan make:datatable {name} {--m=} {--act=} {--resource=} 5.crud create all in one php artisan make:crud AAAController --r={repository} --m={model} --datatable={datatable} --route={route} --resource={resource} --act={act} *datatable ajax url: /ajax-{model}-{act} Facades: 1.ZhyuCurl $data = ZhyuCurl::url($url)->method($method)->json($params); $data = ZhyuCurl::url($url)->post($params); $data = ZhyuCurl::url($url)->put($params); $data = ZhyuCurl::url($url)->patch($params); $data = ZhyuCurl::url($url)->delete($params); $data = ZhyuCurl::url($url)->get($params);