In laravel 4 when you try to render a view that does not exists in app\views or a view with undefined variables laravel will throw an exception or show error that helps with debug.
I have a fresh installation of laravel 5.0.13 and am having a tough time troubleshooting a blade template that shows a blank page when i render a view that does not exists instead or a template with undefined variables instead of throwing an exception or error which will clue me in when debug.
I have installed filp/whoops:~1.0. but still recieve a blank page
class ProfileController extends Controller
{
public function index()
{
return view('indexx'); //this view does not really exist
}
}
The file indexx does not exist in my resources/views and i expect Laravel to throw an exception but am getting a blank page instead, why?
Also when i render a view that exists with some undefined variables i simply get a blank page
Example:
class ProfileController extends Controller {
public function index()
{
return view('index'); //this view exists
}
}
The content of resources/views/index
{!! $this_variable_was_not_passed_an_I_expect_error !!}
As you can see in the view file above the variable does not exist by laravel will simply show a blank page instead of throwing an exception or some debug error.
Also to note i change my laravel default view in config/views
'paths' => [
//realpath(base_path('resources/views'))
realpath(base_path('resources/themes/default'))
],
And laravel was able to render views from resources/themes/default as long as there is no error in the template however, if any error was encountered such ar undefined variable a laravel displays a blank page instead of showing error message
Also to mention that I install virtual box and vagrant on window 7
Could this be a bug or something? Please assist.