You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: app/pages/6.0/11.database/02.default-tables/docs.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ description: UserFrosting's installer creates a number of tables by default. He
5
5
6
6
When you install UserFrosting with the [Bakery CLI](/cli), a number of tables will automatically added to your database. These tables are required for UserFrosting's built-in features, such as user accounts, request throttling, persistent sessions, and access control.
7
7
8
-
The [migrations](/database/migrations) for most tables can be found in the `src/Database/Migrations` directory of the Sprinkle that depends on it. The exceptions are the system tables, which are located in `app/system/Database/Migrations`.
8
+
The [migrations](/database/migrations) for most tables can be found in the `src/Database/Migrations` directory of the Sprinkle that depends on it. The exceptions are the system tables, which are located in the [Core sprinkle](/structure/sprinkles#core-sprinkle).
9
9
10
10
## System tables
11
11
@@ -62,7 +62,7 @@ This table contains records for each user.
Copy file name to clipboardExpand all lines: app/pages/6.0/11.database/05.data-sprunjing/docs.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -211,6 +211,9 @@ To do this, you can define custom methods in your Sprunje:
211
211
}
212
212
```
213
213
214
+
> [!NOTE]
215
+
> `->like()` and `->orLike()` are UserFrosting-specific query builder methods defined in `UserFrosting\Sprinkle\Core\Database\Builder`. They generate `LIKE '%value%'` clauses. You can alternatively use standard Eloquent syntax: `$query->where('genus', 'LIKE', "%{$value}%")->orWhere('species', 'LIKE', "%{$value}%")`.
216
+
214
217
The method name should consist of the field name (converted to StudlyCase), prefixed with `filter` or `sort`.
215
218
216
219
Thus, in this example a request parameter of `filters[scientific_name]=mega` will invoke the `filterScientificName` method in your Sprunje.
Copy file name to clipboardExpand all lines: app/pages/6.0/14.cli/01.commands/docs.md
+11-10Lines changed: 11 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ $ php bakery help
36
36
37
37
### assets:build
38
38
39
-
The `assets:build`(alias : `webpack` & `build-assets`) command is the general assets building command. It combines `assets:install` and `assets:webpack` into a single command:
39
+
The `assets:build` command is the general assets building command. It installs frontend dependencies and triggers a production build. The exact commands run depend on your configured bundler. For Vite (the default), it runs `assets:install` and `assets:vite` depending on the environment:
40
40
41
41
```bash
42
42
$ php bakery assets:build [options]
@@ -54,21 +54,22 @@ See the [Asset Management](/assets-vite) chapter for more information about asse
54
54
55
55
### assets:install
56
56
57
-
The `assets:install` command is an alias for the **NPM** scripts used to install all required frontend dependencies locally, based on `packages.lock`. The versions defined in the lock file will be downloaded. Behind the scene, it's an alias for the `npm install` npm command.
57
+
The `assets:install` command is an alias for the **NPM** scripts used to install all required frontend dependencies locally, based on `package-lock.json`. The versions defined in the lock file will be downloaded. Behind the scene, it's an alias for the `npm install` npm command.
58
58
59
59
### assets:update
60
60
61
-
The `assets:update` command is an alias for the **NPM** scripts used to update all frontend dependencies, ignoring the versions defined in `packages.lock`. Behind the scenes, it's an alias for the `npm update` npm command.
61
+
The `assets:update` command is an alias for the **NPM** scripts used to update all frontend dependencies, ignoring the versions defined in `package-lock.json`. Behind the scenes, it's an alias for the `npm update` npm command.
62
62
63
63
### assets:webpack
64
64
65
-
The `assets:webpack` command is an alias for the **Webpack Encore** scripts used to compile frontend dependencies to `/public/assets`. Behind the scenes, it's an alias for the npm commands `npm run dev`, `npm run build` and `npm run watch`. See the table below for more information.
65
+
The `assets:webpack` command is an alias for the **Webpack Encore** scripts used to compile frontend dependencies to `/public/assets`. Behind the scenes, it's an alias for the npm commands `npm run webpack:dev`, `npm run webpack:build` and `npm run webpack:watch`. See the table below for more information.
|_no options_| Compile the assets for development environment |`npm run webpack:dev`|
70
+
| -p, --production | Compile the assets for production environment |`npm run webpack:build`|
71
+
| -w, --watch | Watch for changes and recompile automatically. Only available in development environment. |`npm run webpack:watch`|
72
+
| -s, --server | Start the HMR development server. |`npm run webpack:server`|
72
73
73
74
> [!NOTE]
74
75
> The `production` option is automatically applied when the [environment mode](/configuration/config-files#environment-modes) is set to `production`.
@@ -101,7 +102,7 @@ See the [Asset Management](/assets-vite) chapter for more information about Vite
101
102
102
103
### bake
103
104
104
-
Bake is the general installation command. It combines `setup:db`, `setup:mail`, `debug`, `migrate`, `create:admin-user`, `assets:build` and `clear-cache` into a single command:
105
+
Bake is the general installation command. It combines `setup:db`, `setup:mail`, `debug`, `migrate`, `assets:build` and `clear-cache` into a single command:
Copy file name to clipboardExpand all lines: app/pages/6.0/15.assets-vite/04.build-workflow/docs.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,11 +53,13 @@ This launches Vite in development mode with:
53
53
54
54
When running, your browser loads assets directly from Vite's dev server for the fastest possible feedback loop.
55
55
56
-
**`npm run vite:build`** - Creates an optimized production build
56
+
**`npm run vite:build`** - Type-checks TypeScript then creates an optimized production build
57
57
```json
58
-
"vite:build": "vite build"
58
+
"vite:build": "vue-tsc && vite build"
59
59
```
60
60
61
+
The `vue-tsc` prefix runs a full TypeScript type-check before building. If there are any type errors, the build will abort. This ensures type safety is enforced in CI as well as locally.
62
+
61
63
This generates production-ready assets with:
62
64
-**Code minification** - Removes whitespace and shortens variable names
63
65
-**Tree shaking** - Eliminates unused code from bundles
@@ -96,7 +98,7 @@ Executes your test suite using [Vitest](https://vitest.dev/), a fast testing fra
96
98
97
99
**`npm run coverage`** - Generates a test coverage report
98
100
```json
99
-
"coverage": "vitest --coverage"
101
+
"coverage": "vitest run --coverage"
100
102
```
101
103
102
104
Creates a detailed report showing which parts of your code are tested.
0 commit comments