|
1 | | -# Waterline |
2 | | - |
3 | | -An elegant UI for monitoring [Laravel Workflows](https://github.com/laravel-workflow/laravel-workflow). |
4 | | - |
5 | | -## Installation |
6 | | - |
7 | | -This UI is installable via [Composer](https://getcomposer.org). |
8 | | - |
9 | | -```bash |
10 | | -composer require laravel-workflow/waterline |
11 | | - |
12 | | -php artisan waterline:install |
13 | | -``` |
14 | | - |
15 | | -## Authorization |
16 | | - |
17 | | -Waterline exposes a dashboard at the `/waterline` URL. By default, you will only be able to access this dashboard in the local environment. However, within your `app/Providers/WaterlineServiceProvider.php` file, there is an authorization gate definition. This authorization gate controls access to Waterline in non-local environments. |
18 | | - |
19 | | -``` |
20 | | -Gate::define('viewWaterline', function ($user) { |
21 | | - return in_array($user->email, [ |
22 | | - |
23 | | - ]); |
24 | | -}); |
25 | | -``` |
26 | | - |
27 | | -This will allow only the single admin user to access the Waterline UI. |
28 | | - |
29 | | - |
30 | | -## Upgrading Waterline |
31 | | - |
32 | | -After upgrading Waterline you must publish the latest assets. |
33 | | - |
34 | | -```bash |
35 | | -composer require laravel-workflow/waterline |
36 | | - |
37 | | -php artisan waterline:publish |
38 | | -``` |
39 | | - |
40 | | -## Dashboard View |
41 | | - |
42 | | - |
43 | | - |
44 | | -## Workflow View |
45 | | - |
46 | | - |
47 | | - |
48 | | -<sub><sup>"Laravel" is a registered trademark of Taylor Otwell. This project is not affiliated, associated, endorsed, or sponsored by Taylor Otwell, nor has it been reviewed, tested, or certified by Taylor Otwell. The use of the trademark "Laravel" is for informational and descriptive purposes only. Laravel Workflow is not officially related to the Laravel trademark or Taylor Otwell.</sup></sub> |
| 1 | +# Waterline |
| 2 | + |
| 3 | +An elegant UI for monitoring [Laravel Workflows](https://github.com/laravel-workflow/laravel-workflow). |
| 4 | + |
| 5 | +## Installation |
| 6 | + |
| 7 | +This UI is installable via [Composer](https://getcomposer.org). |
| 8 | + |
| 9 | +```bash |
| 10 | +composer require laravel-workflow/waterline |
| 11 | + |
| 12 | +php artisan waterline:install |
| 13 | +``` |
| 14 | + |
| 15 | +## Authorization |
| 16 | + |
| 17 | +Waterline exposes a dashboard at the `/waterline` URL. By default, you will only be able to access this dashboard in the local environment. However, within your `app/Providers/WaterlineServiceProvider.php` file, there is an authorization gate definition. This authorization gate controls access to Waterline in non-local environments. |
| 18 | + |
| 19 | +``` |
| 20 | +Gate::define('viewWaterline', function ($user) { |
| 21 | + return in_array($user->email, [ |
| 22 | + |
| 23 | + ]); |
| 24 | +}); |
| 25 | +``` |
| 26 | + |
| 27 | +This will allow only the single admin user to access the Waterline UI. |
| 28 | + |
| 29 | + |
| 30 | +## Upgrading Waterline |
| 31 | + |
| 32 | +After upgrading Waterline you must publish the latest assets. |
| 33 | + |
| 34 | +```bash |
| 35 | +composer require laravel-workflow/waterline |
| 36 | + |
| 37 | +php artisan waterline:publish |
| 38 | +``` |
| 39 | + |
| 40 | +## Dashboard View |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | +## Workflow View |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | +## Development |
| 49 | + |
| 50 | +1. Install dependencies: |
| 51 | + ```bash |
| 52 | + composer install |
| 53 | + npm install |
| 54 | + ``` |
| 55 | +2. Build assets: |
| 56 | + ```bash |
| 57 | + npm run production |
| 58 | + ``` |
| 59 | +3. Publish assets to testbench: |
| 60 | + ```bash |
| 61 | + ./vendor/bin/testbench waterline:publish |
| 62 | + ``` |
| 63 | +4. Run migrations: |
| 64 | + ```bash |
| 65 | + ./vendor/bin/testbench workbench:create-sqlite-db |
| 66 | + ./vendor/bin/testbench migrate:fresh --database=sqlite |
| 67 | + ``` |
| 68 | +5. Start server: |
| 69 | + ```bash |
| 70 | + composer run serve |
| 71 | + ``` |
| 72 | +6. Access dashboard: |
| 73 | + - Local: http://localhost:8000/waterline |
| 74 | +7. Create test workflow: |
| 75 | + ```bash |
| 76 | + ./vendor/bin/testbench workflow:create-test |
| 77 | + ``` |
| 78 | +8. Run queue worker: |
| 79 | + ```bash |
| 80 | + ./vendor/bin/testbench queue:work |
| 81 | + ``` |
| 82 | + |
| 83 | +<sub><sup>"Laravel" is a registered trademark of Taylor Otwell. This project is not affiliated, associated, endorsed, or sponsored by Taylor Otwell, nor has it been reviewed, tested, or certified by Taylor Otwell. The use of the trademark "Laravel" is for informational and descriptive purposes only. Laravel Workflow is not officially related to the Laravel trademark or Taylor Otwell.</sup></sub> |
0 commit comments