Skip to content

Commit 6fee245

Browse files
authored
Create sample-app.md
1 parent afea884 commit 6fee245

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

Diff for: docs/sample-app.md

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
sidebar_position: 7
3+
---
4+
5+
# Sample App
6+
7+
[This](https://github.com/laravel-workflow/sample-app) is a sample Laravel 11 application with example workflows that you can run inside a GitHub codespace.
8+
9+
### Step 1
10+
Create a codespace from the main branch of [this](https://github.com/laravel-workflow/sample-app) repo.
11+
12+
<img src="https://user-images.githubusercontent.com/1130888/233664377-f300ad50-5436-4bb8-b172-c52e12047264.png" alt="image" width="300">
13+
14+
### Step 2
15+
Wait for the codespace to build. This should take between 5 to 10 minutes.
16+
17+
<img src="https://user-images.githubusercontent.com/1130888/233664397-4ae156f3-f69b-406f-b6d4-4f9316684000.png" alt="image" width="500">
18+
19+
### Step 3
20+
Once the codespace has been created. You will see the editor and the terminal at the bottom.
21+
22+
<img src="https://user-images.githubusercontent.com/1130888/233665550-1a4f2098-2919-4108-ac9f-bef1a9f2f47c.png" alt="image" width="400">
23+
24+
### Step 4
25+
Run the migrations to create the necessary database tables.
26+
27+
```bash
28+
php artisan migrate
29+
```
30+
31+
### Step 5
32+
Start the queue worker. This will enable the processing of workflows and activities.
33+
34+
```bash
35+
php artisan queue:work
36+
```
37+
38+
### Step 6
39+
Create a new terminal window.
40+
41+
<img src="https://user-images.githubusercontent.com/1130888/233666917-029247c7-9e6c-46de-b304-27473fd34517.png" alt="image" width="200">
42+
43+
### Step 7
44+
Start the example workflow inside the new terminal window.
45+
46+
```bash
47+
php artisan app:workflow
48+
```
49+
50+
### Step 8
51+
You can view the waterline dashboard via the mapped port.
52+
53+
<img src="https://user-images.githubusercontent.com/1130888/233668485-b988e336-0462-4bbc-bb77-78c73df363b4.png" alt="image" width="500">
54+
55+
Add `/waterline/dashboard` to the URL e.g. `https://[your-codespace-name]-80.preview.app.github.dev/waterline/dashboard`
56+
57+
<img src="https://user-images.githubusercontent.com/1130888/233669600-3340ada6-5f73-4602-8d82-a81a9d43f883.png" alt="image" width="600">
58+
59+
### Step 9
60+
Run the workflow and activity tests.
61+
62+
```bash
63+
php artisan test
64+
```
65+
66+
That's it! You can now create and test workflows.

0 commit comments

Comments
 (0)