Skip to content

Commit

Permalink
rename config 'laravelfly.views' to 'laravelfly.views_to_find_in_worker'
Browse files Browse the repository at this point in the history
  • Loading branch information
scil committed Nov 26, 2015
1 parent a73c58b commit 2691fea
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
8 changes: 4 additions & 4 deletions config/laravelfly.example.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,15 +338,15 @@

], /* end services_to_make_in_worker */

/* Before any request ,files of these view names will be found.
/* Before any request , specified view files will be found.
* They must keep same on every quest.
* It's not neccesary when 'config('laravelfly.services_to_make_in_worker.view.__obj__.finder.views')' is not set to make backup
* This config is not neccesary when 'config('laravelfly.services_to_make_in_worker.view.__obj__.finder.views')' keep commented.
*
* Any of there views is not found, laravelfly would die.
* If one of these view names is not found, it and its subsequent names would be ignored and log to console or log file. .
*
* Only for Greedy mode
*/
'views' => [
'views_to_find_in_worker' => [
// 'home','posts.create','layout.master',
]

Expand Down
3 changes: 2 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ if you want to use mysql persistent, add following to config/database.php ( do n
],
```


## Config examples
[package_config_examples](package_config_examples/)

## Run

Expand Down
4 changes: 2 additions & 2 deletions src/LaravelFly/Greedy/Bootstrap/FindViewFiles.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ class FindViewFiles
*/
public function bootstrap(Application $app)
{
if ($views = $app->make('config')->get('laravelfly.views')) {
if ($views = $app->make('config')->get('laravelfly.views_to_find_in_worker')) {
$finder = $app->make('view')->getFinder();

try {
foreach ($views as $view) {
$finder->find($view);
}
} catch (\Exception $e) {
exit(" view $view not found, please check your config 'laravelfly.views'");
exit(" view $view not found, please check your config 'laravelfly.views_to_find_in_worker'");
}
}

Expand Down

0 comments on commit 2691fea

Please sign in to comment.