Skip to content
This repository was archived by the owner on Dec 30, 2022. It is now read-only.

Commit dbd2764

Browse files
committed
wip
1 parent 09bff23 commit dbd2764

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ The following Composer packages are installed:
4444
- [inertiajs/inertia-laravel](https://github.com/inertiajs/inertia-laravel)
4545
- [laravel/horizon](https://github.com/laravel/horizon)
4646
- [laravel/telescope](https://github.com/laravel/telescope)
47-
- [thepublicgood/deadbolt](https://github.com/tpg/deadbolt)
4847
- [thepublicgood/is-presentable](https://github.com/tpg/is-presentable)
4948
- [tightenco/ziggy](https://github.com/tighten/ziggy)
5049
- [laravel/envoy](https://github.com/laravel/envoy) (dev)
@@ -56,6 +55,7 @@ The following NPM packages are installed:
5655
- [@inertiajs/inertia](https://github.com/inertiajs/inertia)
5756
- [@inertiajs/inertia-vue3](https://github.com/inertiajs/inertia)
5857
- [@inertiajs/progress](https://github.com/inertiajs/progress)
58+
- [@tailwindcss/typography](https://github.com/tailwindlabs/tailwindcss-typography)
5959
- [@vitejs/plugin-vue](https://github.com/vitejs/vite/tree/main/packages/plugin-vue)
6060
- [@vue/compiler-sfc](https://github.com/vuejs/core/tree/main/packages/compiler-sfc)
6161
- [autoprefixer](https://github.com/postcss/autoprefixer)
@@ -131,7 +131,7 @@ You'll need to make sure your app binds your new composer instead of the default
131131
]
132132
```
133133

134-
That's it. Now your app will use your new composer instead of the default Vitamin one. If you need to override the `compose` method in your view composer, remember to call `parent::compose()`:
134+
That's it. Now your app will use your new view composer instead of the default Vitamin one. If you need to override the `compose` method in your view composer, remember to call `parent::compose()`:
135135

136136
```php
137137
public function compose(View $view): void
@@ -151,13 +151,17 @@ During development, all assets are served from the dev server running at port 30
151151
Inertia is my go to these days, so Vitamin will set it up by default. During initialisation, you're asked where your Vue components are stored. You can customize this location in `app.js` if you wish. Vite will load your Vue pages from there. The Inertia documentation uses `resources/js/Pages`, so Vitamin will make that suggestion. However, technically, you can put them anywhere. The only requirement is that the location must be child of the JS path.
152152

153153
### Ziggy
154-
Ziggy is a JavaScript route helper for Laravel. If allows you to use your Laravel defined routes from within your JavaScript front-end. It ships with a fairly decent Vue plugin, so it's included by default. Inside your Vue components, you'll have access to `route` function which you can pass any Laravel defined route name. Something like:
154+
Ziggy is a JavaScript route helper for Laravel. If allows you to use your Laravel defined routes from within your JavaScript front-end. Vitamin comes with a `Router` script that provides a `route` function. You can import this into any Vue file to get access to your Laravel routes:
155155

156156
```javascript
157-
this.route('home');
157+
import {route} from '@/Scripts/Routing/Router.js'
158+
159+
route('home');
158160
```
159161

160-
Vitamin sets up Ziggy routes in the `resources/js/routes.js` file. This file needs to be regenerated each time your change your Laravel routes. Vitamin does this automatically by creating a simple Vite plugin that will run the `yarn routes` script each time a Laravel routes file changes. However, if you ever need to rebuild the routes, simply run `yarn routes` yourself.
162+
Vitamin sets up Ziggy routes in the `resources/js/Scripts/Routing/Ziggy.js` file. This file needs to be regenerated each time your change your Laravel routes. Vitamin does this automatically by creating a simple Vite plugin that will run the `yarn routes` script each time a Laravel routes file changes. However, if you ever need to rebuild the routes, simply run `yarn routes` yourself. If you. change the name of this file or want to place it somewhere else, remember to update the reference in the `Router.js` file as well.
163+
164+
In previous versions of Vitamin, the Ziggy Vue plugin was used, but since I don't use that anymore and now have
161165

162166
## TLS Certificates
163167
It's possible to get all of this to work with TLS as well so you can use an `https` address during development. First, you need to get Valet to secure your site. Valet provides a simple solution for this. If you're serving your site at `mysite.test` then you can get Valet to generate a new certificate:

0 commit comments

Comments
 (0)