Skip to content

Commit 4d83149

Browse files
committed
Merge branch '1.2' into develop
2 parents bf17409 + 9395ca4 commit 4d83149

File tree

4 files changed

+77
-68
lines changed

4 files changed

+77
-68
lines changed

console/asset-compilation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Introduction
44

5-
Winter brings first-class support for handling Node-based compilation for frontend assets through the Mix commands. The comamnds use the [Laravel Mix](https://laravel-mix.com/) wrapper, a user-friendly and simple interface for setting up compilation of multiple types of frontend assets through Webpack and various libraries.
5+
Winter brings first-class support for handling Node-based compilation for frontend assets through the Mix commands. The commands use the [Laravel Mix](https://laravel-mix.com/) wrapper, a user-friendly and simple interface for setting up compilation of multiple types of frontend assets through Webpack and various libraries.
66

77
### Requirements
88

database/structure.md

+17
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,23 @@ Schema::table('users', function ($table) {
217217
});
218218
```
219219

220+
You can also use the `dropColumnIfExists` method on the Schema builder for a slightly safer way of handling migrations:
221+
222+
```php
223+
Schema::table('users', function ($table) {
224+
$table->dropColumnIfExists('single_column');
225+
// or
226+
$table->dropColumnIfExists('one_column', 'two_column');
227+
// or
228+
$table->dropColumnIfExists([
229+
'one_column',
230+
'two_column',
231+
'red_column',
232+
'blue_column',
233+
]);
234+
}
235+
```
236+
220237
### Creating indexes
221238

222239
The schema builder supports several types of indexes. First, let's look at an example that specifies a column's values should be unique. To create the index, we can simply chain the `unique` method onto the column definition:

plugin/unit-testing.md

+13-22
Original file line numberDiff line numberDiff line change
@@ -137,43 +137,34 @@ name: Tests
137137

138138
on:
139139
push:
140+
pull_request:
140141

141142
jobs:
142143
unitTests:
143144
runs-on: ubuntu-latest
144145
name: Unit Tests
145146
steps:
147+
- name: Checkout Winter CMS
148+
uses: actions/checkout@v4
149+
with:
150+
repository: wintercms/winter
151+
ref: develop # change this to a different branch or tag name if you wish to test with a specific version of Winter CMS
152+
146153
- name: Checkout code
147154
uses: actions/checkout@v4
148155
with:
149-
path: my-plugin
156+
path: plugins/my-author/my-plugin # change this to the correct folder for your plugin
150157

151-
- name: Setup PHP and extensions
158+
- name: Install PHP
152159
uses: shivammathur/setup-php@v2
153160
with:
154-
php-version: 8.1
161+
php-version: 8.3 # change this if you wish to test a different PHP version
155162
extensions: mbstring, intl, gd, xml, sqlite
156163
tools: composer:v2
157164

158-
- name: Install Winter
159-
run: |
160-
wget https://github.com/wintercms/winter/archive/develop.zip
161-
unzip develop.zip
162-
rm develop.zip
163-
164-
# Move Winter CMS into place
165-
shopt -s dotglob
166-
mv winter-develop/* ./
167-
rmdir winter-develop
168-
shopt -u dotglob
169-
mv config/cms.php config/testing/cms.php
170-
171-
# Move plugin into place (note that the paths below should be changed to match your plugin path)
172-
mkdir -p plugins/myauthor
173-
mv my-plugin plugins/myauthor/myplugin
174-
175165
- name: Install Composer dependencies
176-
run: composer install --no-interaction --no-progress
166+
run: composer install --no-interaction --no-progress --no-scripts
177167

178168
- name: Run unit tests
179-
run: php artisan winter:test -p MyAuthor.MyPlugin
169+
run: php artisan winter:test -p MyAuthor.MyPlugin # change this to the correct plugin code
170+
```

services/helpers.md

+46-45
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<!-- markdownlint-disable MD051 -->
12
# Helpers
23

34
Winter includes a variety of "helper" PHP functions. Many of these functions are used internally by Winter itself, however, you are free to use them in your own plugins and applications if you find them useful.
@@ -9,22 +10,22 @@ For more useful methods, you should also review the [Laravel `Arr::*()` helpers]
910

1011
<div class="columned-list">
1112

12-
- [array_add](#array_add)
13-
- [array_divide](#array_divide)
14-
- [array_dot](#array_dot)
15-
- [array_undot](#array_undot)
16-
- [array_except](#array_except)
17-
- [array_first](#array_first)
18-
- [array_flatten](#array_flatten)
19-
- [array_forget](#array_forget)
20-
- [array_get](#array_get)
21-
- [array_only](#array_only)
22-
- [array_pluck](#array_pluck)
23-
- [array_pull](#array_pull)
24-
- [array_set](#array_set)
25-
- [array_sort](#array_sort)
26-
- [array_sort_recursive](#array_sort_recursive)
27-
- [array_where](#array_where)
13+
- [array_add](#arrayadd)
14+
- [array_divide](#arraydivide)
15+
- [array_dot](#arraydot)
16+
- [array_undot](#arrayundot)
17+
- [array_except](#arrayexcept)
18+
- [array_first](#arrayfirst)
19+
- [array_flatten](#arrayflatten)
20+
- [array_forget](#arrayforget)
21+
- [array_get](#arrayget)
22+
- [array_only](#arrayonly)
23+
- [array_pluck](#arraypluck)
24+
- [array_pull](#arraypull)
25+
- [array_set](#arrayset)
26+
- [array_sort](#arraysort)
27+
- [array_sort_recursive](#arraysortrecursive)
28+
- [array_where](#arraywhere)
2829
- [head](#head)
2930
- [last](#last)
3031

@@ -36,17 +37,17 @@ Paths
3637
<div class="columned-list">
3738

3839
- [Path Symbols](#path-symbols)
39-
- [app_path](#app_path)
40-
- [base_path](#base_path)
41-
- [config_path](#config_path)
42-
- [database_path](#database_path)
43-
- [media_path](#media_path)
44-
- [plugins_path](#plugins_path)
45-
- [public_path](#public_path)
46-
- [storage_path](#storage_path)
47-
- [temp_path](#temp_path)
48-
- [themes_path](#themes_path)
49-
- [uploads_path](#uploads_path)
40+
- [app_path](#apppath)
41+
- [base_path](#basepath)
42+
- [config_path](#configpath)
43+
- [database_path](#databasepath)
44+
- [media_path](#mediapath)
45+
- [plugins_path](#pluginspath)
46+
- [public_path](#publicpath)
47+
- [storage_path](#storagepath)
48+
- [temp_path](#temppath)
49+
- [themes_path](#themespath)
50+
- [uploads_path](#uploadspath)
5051

5152
</div>
5253

@@ -57,23 +58,23 @@ For more useful methods, you should also review the [Laravel `Str::*()` helpers]
5758

5859
<div class="columned-list">
5960

60-
- [camel_case](#camel_case)
61-
- [class_basename](#class_basename)
61+
- [camel_case](#camelcase)
62+
- [class_basename](#classbasename)
6263
- [e](#e)
63-
- [ends_with](#ends_with)
64-
- [snake_case](#snake_case)
65-
- [str_limit](#str_limit)
66-
- [starts_with](#starts_with)
67-
- [str_contains](#str_contains)
68-
- [str_finish](#str_finish)
69-
- [str_is](#str_is)
70-
- [str_plural](#str_plural)
71-
- [str_random](#str_random)
72-
- [str_singular](#str_singular)
73-
- [str_slug](#str_slug)
74-
- [studly_case](#studly_case)
64+
- [ends_with](#endswith)
65+
- [snake_case](#snakecase)
66+
- [str_limit](#strlimit)
67+
- [starts_with](#startswith)
68+
- [str_contains](#strcontains)
69+
- [str_finish](#strfinish)
70+
- [str_is](#stris)
71+
- [str_plural](#strplural)
72+
- [str_random](#strrandom)
73+
- [str_singular](#strsingular)
74+
- [str_slug](#strslug)
75+
- [studly_case](#studlycase)
7576
- [trans](#trans)
76-
- [trans_choice](#trans_choice)
77+
- [trans_choice](#transchoice)
7778

7879
</div>
7980

@@ -102,9 +103,9 @@ Miscellaneous
102103
- [request](#request)
103104
- [response](#response)
104105
- [route](#route)
105-
- [secure_asset](#secure_asset)
106-
- [trace_log](#trace_log)
107-
- [trace_sql](#trace_sql)
106+
- [secure_asset](#secureasset)
107+
- [trace_log](#tracelog)
108+
- [trace_sql](#tracesql)
108109
- [url](#url)
109110

110111
</div>

0 commit comments

Comments
 (0)