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

Commit ddcc280

Browse files
committed
Added "reo()" function to regenerate Composer's optimized autoload files before running "re()".
1 parent 78ce2b2 commit ddcc280

File tree

2 files changed

+21
-10
lines changed

2 files changed

+21
-10
lines changed

README.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,15 @@ re()
5353

5454
This will allow you to immediately test out your application's code changes.
5555

56-
Aliases:
56+
Aliases: `reboot()`, `reload()`, `restart()`.
5757

58-
- `reboot()`
59-
- `reload()`
60-
- `restart()`
58+
To regenerate Composer's optimized autoload files before rebooting your current session, call:
59+
60+
```
61+
reo()
62+
```
63+
64+
Calling `reo()` simply runs `composer dump -o` before `re()`, ensuring any new classes added to your codebase since starting Tinx are automatically aliasable/resolvable by Laravel Tinker.
6165

6266
### Magic models
6367

@@ -193,11 +197,6 @@ return [
193197

194198
Please post issues and send PRs.
195199

196-
### Suggested improvments
197-
198-
* Add more tests (currently only naming tests are implemented).
199-
* Eloquent should support static calls to `getColumnListing`. Workaround?
200-
201200
## License
202201

203202
MIT

resources/views/includes.blade.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,26 @@ function re() {
1313
}
1414

1515
/**
16-
* Restart aliases.
16+
* Regenerate Composer's optimized autoload files before restarting Tinker.
17+
*
18+
* @return void
19+
* */
20+
function reo() {
21+
exec("composer dump -o");
22+
re();
23+
}
24+
25+
/**
26+
* Aliases.
1727
* */
1828
function reboot() {
1929
re();
2030
}
31+
2132
function reload() {
2233
re();
2334
}
35+
2436
function restart() {
2537
re();
2638
}

0 commit comments

Comments
 (0)