|
8 | 8 |  |
9 | 9 |
|
10 | 10 |
|
11 | | -Simple but yet powerful library for running some [artisan](https://laravel.com/docs/8.x/artisan) commands |
| 11 | +Simple but yet powerful library for running some [artisan](https://laravel.com/docs/8.x/artisan) commands. |
12 | 12 |
|
13 | 13 | ## Requirements |
14 | 14 | - **Laravel** 8.* |
15 | 15 | - **php** ^7.3 |
16 | | -- **internet connection**. For what? For accessing cdns to tailwindcss and alpinejs |
17 | 16 |
|
18 | 17 | ## Installation |
19 | 18 | Just install package: |
20 | 19 | ```bash |
21 | 20 | composer require infureal/artisan-gui |
22 | 21 | ``` |
23 | 22 |
|
24 | | -For some "flexibility" you can publish config file `config/artisan-gui.php`: |
| 23 | +By default package has predefined config and inline styles and scripts. |
| 24 | +Since version `1.4` you can publish vendors like css and js files in `vendor/artisan-gui`: |
25 | 25 | ```bash |
26 | 26 | php artisan vendor:publish --provider="Infureal\Providers\GuiServiceProvider" |
27 | 27 | ``` |
| 28 | +Publish only config: |
| 29 | +```bash |
| 30 | +php artisan vendor:publish --tag="artisan-gui-config" |
| 31 | +``` |
| 32 | + |
| 33 | +Publish only styles and scripts: |
| 34 | +```bash |
| 35 | +php artisan vendor:publish --tag="artisan-gui-css-js" |
| 36 | +``` |
28 | 37 |
|
29 | 38 | ## Running command |
30 | | -By default, you can access this page only when in local environment. |
| 39 | +By default, you can access this page only in local environment. If you wish |
| 40 | +you can change `local` key in config. |
31 | 41 |
|
32 | 42 | Simply go to `http://you-domain.com/~artisan` and here we go! |
33 | 43 | Select needed command from list, fill arguments and options/flags and hit `run` button. |
34 | 44 |
|
| 45 | +## Configuration |
| 46 | +Default config is: |
| 47 | +```php |
| 48 | +<?php |
| 49 | + |
| 50 | +return [ |
| 51 | + |
| 52 | + /* |
| 53 | + |-------------------------------------------------------------------------- |
| 54 | + | Middleware list for web routes |
| 55 | + |-------------------------------------------------------------------------- |
| 56 | + | |
| 57 | + | You can pass any middleware for routes, by default it's just [web] group |
| 58 | + | of middleware. |
| 59 | + | |
| 60 | + */ |
| 61 | + 'middlewares' => [ |
| 62 | + 'web', |
| 63 | +// 'auth' |
| 64 | + ], |
| 65 | + |
| 66 | + /* |
| 67 | + |-------------------------------------------------------------------------- |
| 68 | + | Route prefix |
| 69 | + |-------------------------------------------------------------------------- |
| 70 | + | |
| 71 | + | Prefix for advisor routes. By default url is [/~artisan-gui]. |
| 72 | + | For your wish you can set it for example 'my-'. So url will be [/my-artisan-gui]. |
| 73 | + | |
| 74 | + | Why tilda? It's selected for prevent route names correlation. |
| 75 | + | |
| 76 | + */ |
| 77 | + 'prefix' => '~', |
| 78 | + |
| 79 | + /* |
| 80 | + |-------------------------------------------------------------------------- |
| 81 | + | Home url |
| 82 | + |-------------------------------------------------------------------------- |
| 83 | + | |
| 84 | + | Where to go when [home] button is pressed |
| 85 | + | |
| 86 | + */ |
| 87 | + 'home' => '/', |
| 88 | + |
| 89 | + /* |
| 90 | + |-------------------------------------------------------------------------- |
| 91 | + | Only on local |
| 92 | + |-------------------------------------------------------------------------- |
| 93 | + | |
| 94 | + | Flag that preventing showing commands if environment is on production |
| 95 | + | |
| 96 | + */ |
| 97 | + 'local' => true, |
| 98 | + |
| 99 | + /* |
| 100 | + |-------------------------------------------------------------------------- |
| 101 | + | List of commands |
| 102 | + |-------------------------------------------------------------------------- |
| 103 | + | |
| 104 | + | List of all default commands that has end of execution. Commands like |
| 105 | + | [serve] not supported in case of server side behavior of php. |
| 106 | + | Keys means group. You can shuffle commands as you wish and add your own. |
| 107 | + | |
| 108 | + */ |
| 109 | + 'commands' => [ |
| 110 | + // ... |
| 111 | + ] |
| 112 | + |
| 113 | +]; |
| 114 | + |
| 115 | +``` |
| 116 | + |
35 | 117 | ## Issues |
36 | 118 | If have any issue please [write me](https://github.com/inFureal/artisan-gui/issues). |
0 commit comments