Skip to content
This repository was archived by the owner on Oct 8, 2024. It is now read-only.

Commit e844b7f

Browse files
committed
✨ added new application config
1 parent 5ecde36 commit e844b7f

File tree

2 files changed

+150
-42
lines changed

2 files changed

+150
-42
lines changed

Config/App.php

Lines changed: 0 additions & 42 deletions
This file was deleted.

Config/app.php

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
<?php
2+
3+
return [
4+
/*
5+
|--------------------------------------------------------------------------
6+
| Place app in maintainance mode
7+
|--------------------------------------------------------------------------
8+
|
9+
| Replacement for earlier mode=down. You can set this to true to place
10+
| your app in a maintainance like state. It will display Leaf's default
11+
| app down page if a custom handler is not set.
12+
|
13+
| See:
14+
| https://leafphp.netlify.app/#/leaf/v/2.5.0/config/settings?id=appdown-new
15+
|
16+
*/
17+
"app.down" => false,
18+
19+
/*
20+
|--------------------------------------------------------------------------
21+
| App debugging
22+
|--------------------------------------------------------------------------
23+
|
24+
| If debugging is enabled, Leaf will use its built-in error handler to
25+
| display diagnostic information for uncaught Exceptions, else it will
26+
| display a bare error page usable in production. You can set a
27+
| custom error page to display using `$app->setError`.
28+
|
29+
| You might want to turn this off in production.
30+
|
31+
*/
32+
"debug" => true,
33+
34+
/*
35+
|--------------------------------------------------------------------------
36+
| HTTP Version
37+
|--------------------------------------------------------------------------
38+
|
39+
| By default, Leaf returns an HTTP/1.1 response to the client.
40+
| Use this setting if you need to return an HTTP/1.0 response.
41+
|
42+
*/
43+
"http.version" => "1.1",
44+
45+
/*
46+
|--------------------------------------------------------------------------
47+
| Log directory
48+
|--------------------------------------------------------------------------
49+
|
50+
| This tells leaf which directory to save and look for logs.
51+
|
52+
*/
53+
"log.dir" => storage_path("logs/"),
54+
55+
/*
56+
|--------------------------------------------------------------------------
57+
| Log Enabled
58+
|--------------------------------------------------------------------------
59+
|
60+
| This enables or disables Leaf’s logger. Note that if log.enabled is
61+
| set to false. Leaf will skip initializing anything related to logs,
62+
| as such, you won't have access to $app->logger(),
63+
| $app->log or $app->logWriter.
64+
|
65+
*/
66+
"log.enabled" => true,
67+
68+
/*
69+
|--------------------------------------------------------------------------
70+
| Log file
71+
|--------------------------------------------------------------------------
72+
|
73+
| This setting tells leaf which file to write logs to.
74+
|
75+
*/
76+
"log.file" => "app.log",
77+
78+
/*
79+
|--------------------------------------------------------------------------
80+
| Log level
81+
|--------------------------------------------------------------------------
82+
|
83+
| Leaf has these log levels:
84+
|
85+
| - \Leaf\Log::EMERGENCY
86+
| - \Leaf\Log::ALERT
87+
| - \Leaf\Log::CRITICAL
88+
| - \Leaf\Log::ERROR
89+
| - \Leaf\Log::WARN
90+
| - \Leaf\Log::NOTICE
91+
| - \Leaf\Log::INFO
92+
| - \Leaf\Log::DEBUG
93+
|
94+
*/
95+
"log.level" => \Leaf\Log::DEBUG,
96+
97+
/*
98+
|--------------------------------------------------------------------------
99+
| Log open
100+
|--------------------------------------------------------------------------
101+
|
102+
| Takes in a boolean and determines whether Leaf should create
103+
| the specified log file if it doesn't exist.
104+
|
105+
*/
106+
"log.open" => true,
107+
108+
/*
109+
|--------------------------------------------------------------------------
110+
| Log writer
111+
|--------------------------------------------------------------------------
112+
|
113+
| Use a custom log writer to direct logged messages
114+
| to the appropriate output destination.
115+
|
116+
*/
117+
"log.writer" => null,
118+
119+
/*
120+
|--------------------------------------------------------------------------
121+
| Mode
122+
|--------------------------------------------------------------------------
123+
|
124+
| This is an identifier for the application’s current mode of operation.
125+
| The mode does not affect a Leaf application’s internal functionality.
126+
|
127+
*/
128+
"mode" => "development",
129+
130+
/*
131+
|--------------------------------------------------------------------------
132+
| Views path
133+
|--------------------------------------------------------------------------
134+
|
135+
| The relative or absolute path to the filesystem directory that
136+
| contains your Leaf application’s view files.
137+
|
138+
*/
139+
"views.path" => views_path(),
140+
141+
/*
142+
|--------------------------------------------------------------------------
143+
| views cache path
144+
|--------------------------------------------------------------------------
145+
|
146+
| This config tells leaf where to save cached and compiled views.
147+
|
148+
*/
149+
"views.cachePath" => storage_path('framework/views'),
150+
];

0 commit comments

Comments
 (0)