Skip to content

Commit 30c6c82

Browse files
patrickbrouwersrathorevaibhavgolonixlucastenboomyasuaki640
authored
Update docs (#160)
* Update model.md (#138) * Update Laravel Excel docs with upsert columns explanation (#142) * Update Laravel Excel docs with upsert columns explanation * Add missing import concerns * Update mapping.md (#145) Because $rows passed to prepareRows() is a collection, it cannot go through array_map(). Instead of using array_map() use transform(), * Upgrade * Working on new docs * Doc improvements * Doc improvements * Update docs * Multi sheet + hyperlink docs * Fix typo in contributing.md (#156) * Update support.md * Update license.md * Update docs Co-authored-by: Vaibhav Rathore <[email protected]> Co-authored-by: Michał Golon <[email protected]> Co-authored-by: lucastenboom <[email protected]> Co-authored-by: yasuaki640 <[email protected]>
1 parent 9d1aea7 commit 30c6c82

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+8328
-2009
lines changed

.vuepress/4.x.js

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
module.exports = [
2+
{
3+
title: 'Getting Started',
4+
collapsable: true,
5+
children: prefix('getting-started', [
6+
'',
7+
'license',
8+
'installation',
9+
'upgrade',
10+
'contributing',
11+
'support',
12+
]),
13+
},
14+
{
15+
title: 'Architecture Concepts',
16+
collapsable: true,
17+
children: prefix('architecture', [
18+
'',
19+
'objects',
20+
'concerns',
21+
]),
22+
},
23+
{
24+
title: 'Exports',
25+
collapsable: true,
26+
children: prefix('exports', [
27+
'',
28+
'exporting',
29+
'data',
30+
'columns',
31+
'presentation',
32+
'performance',
33+
'settings',
34+
'advanced',
35+
'concern-overview',
36+
'testing'
37+
]),
38+
},
39+
{
40+
title: 'Imports',
41+
collapsable: true,
42+
children: prefix('imports', [
43+
'',
44+
'basics',
45+
'collection',
46+
'model',
47+
'importables',
48+
'import-formats',
49+
'multiple-sheets',
50+
'heading-row',
51+
'batch-inserts',
52+
'chunk-reading',
53+
'queued',
54+
'validation',
55+
'mapped-cells',
56+
'custom-csv-settings',
57+
'progress-bar',
58+
'concerns',
59+
'extending',
60+
'testing',
61+
]),
62+
},
63+
];
64+
65+
function prefix(prefix, children) {
66+
return children.map(child => `${prefix}/${child}`)
67+
}

.vuepress/config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ module.exports = {
7171
text: 'Version',
7272
link: '/',
7373
items: [
74+
// {text: 'LE 4.x', link: '/4.x/'},
7475
{text: 'LE 3.1', link: '/3.1/'},
7576
{text: 'LE 3.0', link: '/3.0/'},
7677
{text: 'LE 2.1', link: '/2.1/', divider: true},
@@ -81,6 +82,7 @@ module.exports = {
8182
],
8283

8384
sidebar: {
85+
// '/4.x/': require('./4.x'),
8486
'/3.1/': require('./3.1'),
8587
'/3.0/': require('./3.0'),
8688
'/2.1/': require('./2.1'),

.vuepress/styles/index.styl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ h4
8383
.no-toc .page
8484
padding-right 0
8585

86+
.no-toc .content__default
87+
max-width 100% !important
88+
8689
.content__default:not(.custom)
8790
max-width 100%
8891
margin-bottom 1rem
@@ -202,4 +205,4 @@ h4
202205
.content__default:not(.custom)
203206
background-color transparent
204207
border-radius 0
205-
box-shadow none
208+
box-shadow none

.vuepress/styles/palette.styl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
$accentColor = #3e446b
1+
$accentColor = #3f4293
22
$MQMobile = 992px
3-
$codeBgColor = #292C3F
3+
$codeBgColor = #2b294f
44
$navbarHeight=4.2rem
5-
$nprogressColor = #42b983
5+
$nprogressColor = #42b983
6+
$sidebarWidth=16rem

.vuepress/theme/styles/code.styl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@
1111
color #EC5975
1212
&.inserted
1313
color $accentColor
14+
p
15+
> code
16+
color #7d47af
17+
padding 0.18rem 0.5rem
18+
margin 0
19+
font-size 0.8em
20+
background-color rgb(227 220 241)
21+
border-radius 16px
22+
font-weight bold
23+
white-space nowrap
1424

1525
.content__default
1626
pre, pre[class*="language-"]

.vuepress/theme/styles/custom-blocks.styl

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.custom-block
22
.custom-block-title
3-
font-weight 600
3+
font-weight 700
44
margin-bottom -0.4rem
55
&.tip, &.warning, &.danger
66
padding .1rem 1.5rem
@@ -9,7 +9,7 @@
99
margin 1rem 0
1010
&.tip
1111
background-color #f3f5f7
12-
border-color #42b983
12+
border-color #1c78e6
1313
&.warning
1414
background-color rgba(255,229,100,.3)
1515
border-color darken(#ffe564, 35%)
@@ -30,18 +30,62 @@
3030
pre.vue-container
3131
border-left-width: .5rem;
3232
border-left-style: solid;
33-
border-color: #42b983;
33+
border-color: #6b72df;
3434
border-radius: 0px;
3535
& > code
3636
font-size: 14px !important;
3737
& > p
3838
margin: -5px 0 -20px 0;
3939
code
40-
background-color: #42b983 !important;
40+
background-color: #7881f9 !important;
4141
padding: 3px 5px;
4242
border-radius: 3px;
4343
color #000
4444
em
4545
color #808080
4646
font-weight light
4747

48+
.language-text.line-numbers-mode, .language-.line-numbers-mode, .language-shell.line-numbers-mode
49+
.line-numbers-wrapper
50+
display none
51+
&::after
52+
display none
53+
pre
54+
padding-left 2rem !important
55+
56+
.language-shell.line-numbers-mode
57+
pre::before
58+
color #808080
59+
margin-right 10px
60+
content "$"
61+
62+
.inline-step
63+
background #606acf
64+
color: white;
65+
border-radius 100%
66+
width 1.6rem
67+
height 1.6rem
68+
font-weight 700
69+
font-size 14px
70+
display inline-flex
71+
align-items center
72+
justify-content center
73+
margin-right 5px
74+
75+
.with-steps .content__default
76+
position relative
77+
78+
.step
79+
background #606acf
80+
color: white;
81+
border-radius 100%
82+
font-size 15px
83+
width 1.5rem
84+
height 1.5rem
85+
display inline-flex
86+
align-items center
87+
justify-content center
88+
position absolute
89+
right 0
90+
margin-right 32px
91+
margin-top 6px

.vuepress/theme/styles/theme.styl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ ul, ol
101101
padding-left 1.2em
102102

103103
strong
104-
font-weight 600
104+
font-weight 700
105105

106106
h1, h2, h3, h4, h5, h6
107107
font-weight 600

.vuepress/theme/styles/wrapper.styl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
$wrapper
22
max-width $contentWidth
33
margin 0 auto
4-
padding 2rem 2.5rem
4+
padding 1.5rem 1.75em
55
@media (max-width: $MQNarrow)
66
padding 2rem
77
@media (max-width: $MQMobileNarrow)

3.0/getting-started/contributing.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Please read and understand the contribution guide before creating an issue or pu
77
## Important Links
88

99
- [Docs](https://laravel-excel.maatwebsite.nl)
10-
- [Issue tracker](https://github.com/Maatwebsite/Laravel-Excel/issues)
10+
- [Issue tracker](https://github.com/SpartnerNL/Laravel-Excel/issues)
1111
- [Support](/3.0/getting-started/support.html)
1212

1313
## Etiquette
@@ -30,20 +30,20 @@ whether or not your feature is likely to be used by other users of the project.
3030

3131
- Check the codebase to ensure that your feature doesn't already exist.
3232
- Check the pull requests to ensure that another person hasn't already submitted the feature or fix.
33-
- Use the [pull request template](https://github.com/Maatwebsite/Laravel-Excel/blob/3.0/.github/PULL_REQUEST_TEMPLATE.md).
33+
- Use the [pull request template](https://github.com/SpartnerNL/Laravel-Excel/blob/3.0/.github/PULL_REQUEST_TEMPLATE.md).
3434

3535
## How to report a bug?
3636

3737
- Attempt to replicate the problem, to ensure that it wasn't a coincidental incident.
3838
- Check to make sure your bug report isn't already present within the project.
3939
- Check the pull requests tab to ensure that the bug doesn't have a fix in progress.
4040
- Check the pull requests tab to ensure that the feature isn't already in progress.
41-
- Use the [issue template](https://github.com/Maatwebsite/Laravel-Excel/blob/3.0/.github/ISSUE_TEMPLATE.md).
41+
- Use the [issue template](https://github.com/SpartnerNL/Laravel-Excel/blob/3.0/.github/ISSUE_TEMPLATE.md).
4242

4343
## Requirements
4444

4545
- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)**. - Style will get automatically fixed by StyleCI.
4646
- **Add tests backing up your change!** - You can run the test by running `vendor/bin/phpunit`
47-
- **Document any change in behaviour** - Documentation is located in the [https://github.com/Maatwebsite/laravel-excel-docs](https://github.com/Maatwebsite/laravel-excel-docs)
47+
- **Document any change in behaviour** - Documentation is located in the [https://github.com/SpartnerNL/laravel-excel-docs](https://github.com/SpartnerNL/laravel-excel-docs)
4848
- **One feature per Pull Request**
4949
- **Add meaningful commit messages**

3.0/getting-started/support.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Before you request support, please check the following:
2525
* Attempt to replicate the problem, to ensure that it wasn't a coincidental incident.
2626
* Check to make sure your support request isn't already present within the project.
2727
* Check the pull requests tab to ensure that the bug doesn't have a fix in progress.
28-
* Use the [issue template](https://github.com/Maatwebsite/Laravel-Excel/blob/3.0/.github/ISSUE_TEMPLATE.md).
28+
* Use the [issue template](https://github.com/SpartnerNL/Laravel-Excel/blob/3.0/.github/ISSUE_TEMPLATE.md).
2929

3030
Filling out the template is required. Issues that do not include enough information might not be picked up. Please write in English (or Dutch).
3131

3.1/exports/mapping.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,12 @@ use Maatwebsite\Excel\Concerns\WithHeadings;
117117

118118
class UsersExport implements FromQuery, WithHeadings
119119
{
120-
public function prepareRows($rows): array
121-
{
122-
return array_map(function ($user) {
123-
$user->name .= ' (prepared)';
124-
125-
return $user;
126-
}, $rows);
127-
}
120+
public function prepareRows($rows)
121+
{
122+
return $rows->transform(function ($user) {
123+
$user->name .= ' (prepared)';
124+
125+
return $user;
126+
});
128127
}
129128
```

3.1/getting-started/contributing.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Please read and understand the contribution guide before creating an issue or pu
77
## Important Links
88

99
- [Docs](https://docs.laravel-excel.com/)
10-
- [Issue tracker](https://github.com/Maatwebsite/Laravel-Excel/issues)
10+
- [Issue tracker](https://github.com/SpartnerNL/Laravel-Excel/issues)
1111
- [Support](/3.1/getting-started/support.html)
1212

1313
## Etiquette
@@ -30,21 +30,21 @@ whether or not your feature is likely to be used by other users of the project.
3030

3131
- Check the codebase to ensure that your feature doesn't already exist.
3232
- Check the pull requests to ensure that another person hasn't already submitted the feature or fix.
33-
- Use the [pull request template](https://github.com/Maatwebsite/Laravel-Excel/blob/3.1/.github/PULL_REQUEST_TEMPLATE.md).
33+
- Use the [pull request template](https://github.com/SpartnerNL/Laravel-Excel/blob/3.1/.github/PULL_REQUEST_TEMPLATE.md).
3434

3535
## How to report a bug?
3636

3737
- Attempt to replicate the problem, to ensure that it wasn't a coincidental incident.
3838
- Check to make sure your bug report isn't already present within the project.
3939
- Check the pull requests tab to ensure that the bug doesn't have a fix in progress.
4040
- Check the pull requests tab to ensure that the feature isn't already in progress.
41-
- Use the [issue template](https://github.com/Maatwebsite/Laravel-Excel/blob/3.1/.github/ISSUE_TEMPLATE.md).
41+
- Use the [issue template](https://github.com/SpartnerNL/Laravel-Excel/blob/3.1/.github/ISSUE_TEMPLATE.md).
4242

4343
## PR Requirements
4444
- The PR **must** apply to [PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md). StyleCI help you detect code style issues.
4545
- The PR **must** be as clean as possible. Try to remove all inline TODOs and unneeded comments. They are noise and distraction for the reviewer. Use Github's (inline) comment system to start a discussion about a change.
4646
- The existing tests **must** not fail after your changes. This would indicate that existing functionality is broken and should be addressed before a review is started. You can run the test by running `vendor/bin/phpunit`
4747
- The changes **must** be backed-up with tests.
4848
- The PR **must** only have one feature. Split up multiple features in multiple PRs, so they can be individually reviewed and merged.
49-
- The PR **must** must be accompanied by a PR to the docs in case of new features. Documentation is located in the [https://github.com/Maatwebsite/laravel-excel-docs](https://github.com/Maatwebsite/laravel-excel-docs) repository.
49+
- The PR **must** be accompanied by a PR to the docs in case of new features. Documentation is located in the [https://github.com/SpartnerNL/laravel-excel-docs](https://github.com/SpartnerNL/laravel-excel-docs) repository.
5050
- The PR should contain meaningful commit messages.

3.1/getting-started/license.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,25 @@ Our software is open source and licensed under the [MIT license](https://choosea
88
## Postcardware
99
According to the [postcardware](https://en.wikipedia.org/wiki/Postcardware) concept, if you use the software for your project(s) we would appreciate to receive a postcard of your hometown. Please send it to:
1010

11-
**Maatwebsite**
12-
Markt 2
11+
**Spartner**
12+
Markt 2
1313
6231 LS Meerssen
1414
The Netherlands
1515

16+
## Created by Spartner (formerly Maatwebsite)
17+
18+
We are a strategic development partner, creating web-based custom built software from Laravel. In need of a digital solution for your challenge? Give us a call.
19+
20+
[https://spartner.software](https://spartner.software)
21+
22+
+31 (0) 10 - 7449312
23+
1624
## Support
1725

1826
::: warning Support
1927
We hold no liability and will provide support on a best effort basis. For more information about support please see [support](https://docs.laravel-excel.com/3.1/getting-started/support.html).
2028
:::
2129

2230
:::tip Commercial Support
23-
:rocket: If you use the software commercially and need support urgently, we can offer this on a commercial basis. Please contact <info@maatwebsite.nl> or phone +31 (0)10 744 9312.
31+
:rocket: If you use the software commercially and need support urgently, we can offer this on a commercial basis. Please contact <info@spartner.nl> or phone +31 (0)10 744 9312.
2432
:::

3.1/getting-started/support.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Our software is free and open source, meaning that the use of our software is optional. We hold no liability and there is no obligation to support. We will provide support on a best effort basis.
66

77
:::tip Commercial Support
8-
If you use the software commercially and need elaborate support or need it urgently, we can offer this on a commercial basis. Please contact <info@maatwebsite.nl> or via phone +31 (0)10 744 9312.
8+
If you use the software commercially and need elaborate support or need it urgently, we can offer this on a commercial basis. Please contact <info@spartner.nl> or via phone +31 (0)10 744 9312.
99
:::
1010

1111
## Supported Versions
@@ -27,7 +27,7 @@ Before you request support, please check the following:
2727
* Attempt to replicate the problem, to ensure that it wasn't a coincidental incident.
2828
* Check to make sure your support request isn't already present within the project.
2929
* Check the pull requests tab to ensure that the bug doesn't have a fix in progress.
30-
* Use one of the [issue templates](https://github.com/Maatwebsite/Laravel-Excel/tree/3.1/.github/ISSUE_TEMPLATE).
30+
* Use one of the [issue templates](https://github.com/SpartnerSoftware/Laravel-Excel/tree/3.1/.github/ISSUE_TEMPLATE).
3131

3232
Filling out the template is required. Issues that do not include enough information might not be picked up. Please write in English (or Dutch).
3333

3.1/getting-started/upgrade.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ ALL Laravel Excel 2.* methods are deprecated and will not be able to use in 3.0
4040
- `Excel::create()->string('xlsx')` is removed an replaced by `Excel::raw($yourExport, Excel::XLSX)`
4141
- 3.0 provides no convenience methods for styling, you are encouraged to use PhpSpreadsheets native methods.
4242

43-
You can find an example upgrade for an export here: [https://github.com/Maatwebsite/Laravel-Excel/issues/1799](https://github.com/Maatwebsite/Laravel-Excel/issues/1799)
43+
You can find an example upgrade for an export here: [https://github.com/SpartnerNL/Laravel-Excel/issues/1799](https://github.com/SpartnerNL/Laravel-Excel/issues/1799)

3.1/imports/concerns.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ pageClass: no-toc
2323
|`Maatwebsite\Excel\Concerns\WithCustomCsvSettings`| Allows to run custom Csv settings for this specific importable. | [Custom CSV Settings](/3.1/imports/custom-csv-settings.html) |
2424
|`Maatwebsite\Excel\Concerns\WithStartRow`| Define a custom start row. | |
2525
|`Maatwebsite\Excel\Concerns\WithProgressBar`| Shows a progress bar when uploading via the console. | [Progress Bar](/3.1/imports/progress-bar.html) |
26+
|`Maatwebsite\Excel\Concerns\WithUpsert`| Allows to upsert models. | [Upserting models](/3.1/imports/model.html#upserting-models) |
27+
|`Maatwebsite\Excel\Concerns\WithUpsertColumns`| Allows upsert columns definition. | [Upserting with specific columns](/3.1/imports/model.html#upserting-with-specific-columns) |
2628
|`Maatwebsite\Excel\Concerns\WithValidation`| Validates each row against a set of rules. | [Row Validation](/3.1/imports/validation.html) |
2729
|`Maatwebsite\Excel\Concerns\SkipsEmptyRows`| Skips empty rows. | [Row Validation](/3.1/imports/validation.html#skipping-empty-rows) |
2830
|`Maatwebsite\Excel\Concerns\SkipsOnFailure`| Skips on validation errors. | [Row Validation](/3.1/imports/validation.html#skipping-failures) |

0 commit comments

Comments
 (0)