Skip to content

Commit 9611271

Browse files
committed
Fix formatting
1 parent 7df29dc commit 9611271

File tree

1 file changed

+30
-11
lines changed

1 file changed

+30
-11
lines changed

docs/developers/addons.md

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,21 @@ with the phpVMS codebase.
1818

1919
To generate a module, run:
2020

21-
```bash
21+
```shell
2222
php artisan module:make {ModuleName}
2323
```
2424

2525
Which generates the basic structure in the `/modules` folder. After generating
2626
the module, if you want to make it available on composer, edit the
2727
`composer.json` file, setting your `VENDOR` and author information.
2828

29-
:::tip All of the examples below will be based on a module named `Sample`. To
29+
:::tip
30+
31+
All of the examples below will be based on a module named `Sample`. To
3032
see the source for the module,
31-
[check it out on GitHub](https://github.com/nabeelio/phpvms-module). :::
33+
[check it out on GitHub](https://github.com/nabeelio/phpvms-module).
34+
35+
:::
3236

3337
---
3438

@@ -77,8 +81,6 @@ When a module is created, a directory structure like this is created:
7781

7882
### Automatic Installation
7983

80-
:::note Still being written :::
81-
8284
To be able to publish to composer, add `joshbrw/laravel-module-installer` as a
8385
dependency in your module's `composer.json` file, and then set the `type` in the
8486
`composer.json` file to `laravel-module`. Then a user can run
@@ -140,8 +142,12 @@ don't need to call a check or something in every method.
140142
'middleware' => ['api.auth'] # for API routes, you can add this middlware to require API auth
141143
```
142144

143-
:::note Read more about
144-
[Laravel Middleware](https://laravel.com/docs/9.x/middleware) :::
145+
:::note
146+
147+
Read more about
148+
[Laravel Middleware](https://laravel.com/docs/9.x/middleware)
149+
150+
:::
145151

146152
---
147153

@@ -257,11 +263,15 @@ Laravel includes a way to create and update tables, called
257263
programmatically define your tables, and let the framework worry about the exact
258264
syntax to use. The advantage to this abstraction is being.
259265

260-
! You should _not_ be using raw SQL
266+
:::warning
267+
268+
You should _not_ be using raw SQL
269+
270+
:::
261271

262272
There is an `artisan` helper to generate migrations:
263273

264-
```bash
274+
```shell
265275
php artisan module:make-migration create_sample_table ModuleName
266276
```
267277

@@ -274,13 +284,22 @@ straight-forward, without having to run any SQL manually.
274284
The `app/Database/migrations` directory has the core migrations and is a good
275285
reference on field types, especially if you're looking to add relationships.
276286

277-
!!! Design your tables well - follow the guidelines set by Laravel, and you'll
287+
:::note
288+
289+
Design your tables well - follow the guidelines set by Laravel, and you'll
278290
have a much better time.
279291

280-
!!!! Add new migration files when you have to modify a table, etc, after you've
292+
:::
293+
294+
295+
:::note
296+
297+
Add new migration files when you have to modify a table, etc, after you've
281298
released it into the wild. The migrations that are run are kept track of, so if
282299
it's seen that it's already run the file, it won't run it again.
283300

301+
:::
302+
284303
### Seeding Data
285304

286305
I've added a few extra features, including adding seed data, including adding

0 commit comments

Comments
 (0)