I am trying to create a blade profile in laravel. I created "master.blade.php" in "xampp\\htdocs\\laravel5-learning\\resources\\views\\layouts" This contains:
<!DOCTYPE html>
<html>
<head>
<title>@yield('title')</title>
</head>
<body>
<div class="container">
@yield('content')
</div>
</body>
</html>
Then i have a file "welcome.blade.php" in the direction "xampp\\htdocs\\laravel5-learning\\resources\\views". It contains:
@extends('layouts.master')
@section('title')
Welcome!
@endsection
@section('content')
This is the content!
@endsection
This won't work however. I have also a test php file in there, this works when running localhost\\laravel5-learning\\resources\\views\\test.php
I got apache and a sql server running using xampp.
Anybody an idea? I feel like i am missing an important step for using Laravel. I installed xampp, then installed Laravel using composer with the line in the htdocs folder: composer create-project laravel/laravel laravel5-learning
If i go to http://localhost/laravel5-learning/resources/views/welcome.blade.php the actual code shows: @extends('layouts.master') @section('title') Welcome! @endsection @section('content') This is the content! @endsection
Anybody an idea?
Found the solution. I was running the actual code, but i should run the index.html file in the public folder.
I very big rookie mistake i guess.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.