I'm using PHPStorm as IDE for creating Laravel pages. I actually just started learning it. However, I noticed that even if I comment out the @extends('layout.app')
like {{--@extends('layout.app')--}}
somehow it still reads the html and includes the app.blade.php
as display on the browser.
To better explain, here are the codes.
Controller.php
public function showContactPage()
{
$people = ['Hello', 'World', 'Ashton', 'Alvin'];
return view('contact', compact('people'));
}
app.blade.php
<html>
<head>
<title>Blade Templating Sample</title>
</head>
<body>
<div class="container">
@yield('content')
</div>
</body>
</html>
contact.blade.php
{{--@extends('layout.app')--}}
@section('content')
<h1>Contact Page</h1>
@if(count($people))
<ul>
@foreach($people as $person)
<li>{{$person}}</li>
@endforeach
</ul>
@endif
@stop
Output on browser
View Page Source codes
<html>
<head>
<title>Blade Templating Sample</title>
</head>
<body>
<div class="container">
<h1>Contact Page</h1>
<ul>
<li>Hello</li>
<li>World</li>
<li>Ashton</li>
<li>Alvin</li>
</ul>
</div>
</body>
</html>
If you look on the page sources html
code, it still shows what's in app.blade.php even if I commented out the {{--@extends('layout.app')--}}
in contact.blade.php
I don't know if it's an issue with PHPStorm or the browser or if it is something I should expect as result after commenting out the @extends
Or maybe with Laravel 5.3
I'd appreciate any thoughts or explanation to this.
Thank you.