extends layouts
Closed this issue · 2 comments
blonder413 commented
I have created a layout in layouts folder with blade extension but when in my view I use the sentence @extends('layouts/principal') give me the follow error:
View [layouts.principal] not found. (View: /home/blonder413/public_html/cursoyii2/clase36/views/site/index.blade)
blonder413 commented
I can't put html code in my blade view.
This is my layout:
`
<title>{{ $view->title }}</title> {{ $content }} `This is my controller
`public function actionIndex()
{
$this->layout = "principal.blade";
$data = ["hola mundo","adiós mundo"];
return $this->render('index.blade', [
"texto" => $data,
]);
}`
And this is my view
`@foreach($texto as $value)
{{ $value }}
@Endforeach
@section('title')
{{ $view->title = "Mi index con blade" }}
@endsection`
blonder413 commented
solved