Commit 6d26eae
committed
feat(model): Added wrap and _unwrap methods to Model.js to mimmic Laravel's resource data wrapping. This is a shortcut for , , , that allows you to not only automatically unwrap using the standard first, find, get, all methods but also change what the wrapper key is in case you don't want to use the standard 'data' property
1 parent 88fbe9a commit 6d26eae
1 file changed
+26
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
59 | 82 | | |
60 | 83 | | |
61 | 84 | | |
| |||
365 | 388 | | |
366 | 389 | | |
367 | 390 | | |
368 | | - | |
| 391 | + | |
369 | 392 | | |
370 | 393 | | |
371 | 394 | | |
| |||
386 | 409 | | |
387 | 410 | | |
388 | 411 | | |
389 | | - | |
| 412 | + | |
390 | 413 | | |
391 | 414 | | |
392 | 415 | | |
| |||
421 | 444 | | |
422 | 445 | | |
423 | 446 | | |
424 | | - | |
| 447 | + | |
425 | 448 | | |
426 | 449 | | |
427 | 450 | | |
| |||
0 commit comments