如何从我的控制器访问app/config/app.php
中的调试变量以查看我是否处于调试模式?laravel如何阅读app/config/app.php调试变量
<?php
|
/* | if ($this->user->id)
|-------------------------------------------------------------------------- | {
| Application Debug Mode | // Save roles. Handles updating.
|-------------------------------------------------------------------------- | $this->user->saveRoles(Input::get('roles'));
| |
| When your application is in debug mode, detailed error messages with | // Redirect to the new user page
| stack traces will be shown on every error that occurs within your | return Redirect::to('admin/users/'.$this->user->id)->with('success', Lang::get('admin/users/messages.cre
| application. If disabled, a simple generic error page is shown. |ate.success'));
| | }
*/ | else
| {
'debug' => true,
我得到undefined fu nction config()...我在Laravel 4.2上。 – Phil
哦,谢谢!我现在在这里看到它http://laravel.com/docs/4.2/configuration – Phil