|
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-reactable/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-reactable/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-reactable/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-reactable"> |
| 23 | + <img alt="Packagist Downloads" src="https://img.shields.io/packagist/dt/yuges-code/laravel-reactable"> |
| 24 | + <img alt="GitHub License" src="https://img.shields.io/github/license/yuges-code/laravel-reactable"> |
| 25 | + <img alt="Packagist Stars" src="https://img.shields.io/packagist/stars/yuges-code/laravel-reactable"> |
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-reactable/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 Reactable</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 reactions 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-reactable |
| 55 | +``` |
| 56 | + |
| 57 | +### → Publishing Config |
| 58 | + |
| 59 | +Publishing the config file (config/reactable.php) is optional: |
| 60 | + |
| 61 | +``` |
| 62 | +php artisan vendor:publish --provider="Yuges\Reactable\Providers\ReactableServiceProvider" --tag="reactable-configs" |
| 63 | +``` |
| 64 | + |
| 65 | +### → Publishing Migrations |
| 66 | + |
| 67 | +You need to publish the migration to create the reactions table: |
| 68 | + |
| 69 | +``` |
| 70 | +php artisan vendor:publish --provider="Yuges\Reactable\Providers\ReactableServiceProvider" --tag="reactable-migrations" |
| 71 | +``` |
| 72 | + |
| 73 | +### → Running Migrations |
| 74 | + |
| 75 | +After that, you need to run migrations: |
48 | 76 |
|
49 | 77 | ``` |
50 | | -git clone https://github.com/yuges-code/laravel-package-template.git |
51 | | -cd laravel-package-template |
| 78 | +php artisan migrate |
| 79 | +``` |
| 80 | + |
| 81 | +### → Publishing Seeders |
52 | 82 |
|
53 | | -composer install |
| 83 | +You need to publish the seeder to seed the reaction types table: |
| 84 | + |
| 85 | +``` |
| 86 | +php artisan vendor:publish --provider="Yuges\Reactable\Providers\ReactableServiceProvider" --tag="reactable-seeders" |
54 | 87 | ``` |
55 | 88 |
|
| 89 | +### → Running Seeders |
| 90 | + |
| 91 | +After that, you need to run seeders: |
| 92 | + |
| 93 | +``` |
| 94 | +php artisan db:seed |
| 95 | +``` |
| 96 | + |
| 97 | +<br> |
| 98 | + |
56 | 99 | # 🧪 Running Tests |
57 | 100 |
|
| 101 | +### → PHPUnit tests |
| 102 | + |
58 | 103 | To run tests, run the following command: |
59 | 104 |
|
60 | 105 | ``` |
61 | 106 | composer test |
62 | 107 | ``` |
63 | 108 |
|
| 109 | +<br> |
| 110 | + |
64 | 111 | # ⚖️ License |
65 | 112 |
|
66 | 113 | The MIT License (MIT). Please see [License File](LICENSE) for more information. |
67 | 114 |
|
| 115 | +<br> |
| 116 | + |
68 | 117 | # 🙆🏼♂️ Authors Information |
69 | 118 |
|
70 | 119 | Created in 2025 by: |
|
0 commit comments