|
1 | 1 | <div align="center"> |
2 | | - <img src="https://raw.githubusercontent.com/yuges-code/laravel-package-template/master/assets/logo.png"> |
| 2 | + <img src="https://raw.githubusercontent.com/yuges-code/laravel-groupable/master/assets/logo.png"> |
3 | 3 | </div> |
4 | 4 |
|
5 | 5 | <div align="center"> |
6 | 6 | <b>Build<b> |
7 | 7 | <div> |
8 | 8 | <img |
9 | 9 | alt="GitHub Branch Check Runs" |
10 | | - src="https://img.shields.io/github/check-runs/yuges-code/laravel-package-template/main" |
| 10 | + src="https://img.shields.io/github/check-runs/yuges-code/laravel-groupable/main" |
11 | 11 | > |
12 | 12 | <img |
13 | 13 | alt="GitHub Tests Action Status" |
14 | | - src="https://img.shields.io/github/actions/workflow/status/yuges-code/laravel-package-template/testing.yml?branch=main&label=tests&style=flat-square" |
| 14 | + src="https://img.shields.io/github/actions/workflow/status/yuges-code/laravel-groupable/testing.yml?branch=main&label=tests&style=flat-square" |
15 | 15 | > |
16 | 16 | </div> |
17 | 17 | </div> |
18 | 18 |
|
19 | 19 | <div align="center"> |
20 | 20 | <b>Project</b> |
21 | 21 | <div> |
22 | | - <img alt="GitHub Release" src="https://img.shields.io/github/v/release/yuges-code/laravel-package-template"> |
23 | | - <img alt="Packagist Downloads" src="https://img.shields.io/packagist/dt/yuges-code/laravel-package-template"> |
24 | | - <img alt="GitHub License" src="https://img.shields.io/github/license/yuges-code/laravel-package-template"> |
25 | | - <img alt="Packagist Stars" src="https://img.shields.io/packagist/stars/yuges-code/laravel-package-template"> |
| 22 | + <img alt="GitHub Release" src="https://img.shields.io/github/v/release/yuges-code/laravel-groupable"> |
| 23 | + <img alt="Packagist Downloads" src="https://img.shields.io/packagist/dt/yuges-code/laravel-groupable"> |
| 24 | + <img alt="GitHub License" src="https://img.shields.io/github/license/yuges-code/laravel-groupable"> |
| 25 | + <img alt="Packagist Stars" src="https://img.shields.io/packagist/stars/yuges-code/laravel-groupable"> |
26 | 26 | <img |
27 | 27 | alt="Packagist Dependency Version" |
28 | | - src="https://img.shields.io/packagist/dependency-v/yuges-code/laravel-package-template/php" |
| 28 | + src="https://img.shields.io/packagist/dependency-v/yuges-code/laravel-groupable/php" |
29 | 29 | > |
30 | 30 | </div> |
31 | 31 | </div> |
|
35 | 35 | </div> |
36 | 36 |
|
37 | 37 | <div align="center"> |
38 | | - <h1>Laravel package template</h1> |
| 38 | + <h1>Laravel Groupable</h1> |
39 | 39 | </div> |
40 | 40 |
|
41 | 41 | <div align="center"> |
42 | | - <h3>π Starter template for all Yuges Laravel packages</h3> |
| 42 | + <h3>ποΈ Package for easily attaching groups to Laravel eloquent models</h3> |
43 | 43 | </div> |
44 | 44 |
|
| 45 | +<br> |
| 46 | + |
45 | 47 | # πΏ Installation |
46 | 48 |
|
47 | | -To use this template, clone the repository and install the dependencies: |
| 49 | +### β Composer |
| 50 | + |
| 51 | +You can install the package via composer: |
| 52 | + |
| 53 | +``` |
| 54 | +composer require yuges-code/laravel-groupable |
| 55 | +``` |
| 56 | + |
| 57 | +### β Publishing Config |
| 58 | + |
| 59 | +Publishing the config file (config/groupable.php) is optional: |
| 60 | + |
| 61 | +``` |
| 62 | +php artisan vendor:publish --provider="Yuges\Groupable\Providers\GroupableServiceProvider" --tag="groupable-configs" |
| 63 | +``` |
| 64 | + |
| 65 | +### β Publishing Migrations |
| 66 | + |
| 67 | +You need to publish the migration to create the groups table: |
48 | 68 |
|
49 | 69 | ``` |
50 | | -git clone https://github.com/yuges-code/laravel-package-template.git |
51 | | -cd laravel-package-template |
| 70 | +php artisan vendor:publish --provider="Yuges\Groupable\Providers\GroupableServiceProvider" --tag="groupable-migrations" |
| 71 | +``` |
| 72 | + |
| 73 | +### β Running Migrations |
| 74 | + |
| 75 | +After that, you need to run migrations: |
52 | 76 |
|
53 | | -composer install |
54 | 77 | ``` |
| 78 | +php artisan migrate |
| 79 | +``` |
| 80 | + |
| 81 | +<br> |
55 | 82 |
|
56 | 83 | # π§ͺ Running Tests |
57 | 84 |
|
| 85 | +### β PHPUnit tests |
| 86 | + |
58 | 87 | To run tests, run the following command: |
59 | 88 |
|
60 | 89 | ``` |
61 | 90 | composer test |
62 | 91 | ``` |
63 | 92 |
|
| 93 | +<br> |
| 94 | + |
64 | 95 | # βοΈ License |
65 | 96 |
|
66 | 97 | The MIT License (MIT). Please see [License File](LICENSE) for more information. |
67 | 98 |
|
| 99 | +<br> |
| 100 | + |
68 | 101 | # ππΌββοΈ Authors Information |
69 | 102 |
|
70 | 103 | Created in 2025 by: |
|
0 commit comments