2015-08-02 14:45 阅读 50


I have this code:

in laravel/resources/views/users.blade.php


    Here's your content

in laravel/resources/views/layouts/main.blade.php

    {{-- Common Header Stuff Here --}}
<div class="navigation">
    <a href="/">Home</a>
    <a href="/contact">Contact</a>
<div class="container">

in routes.php

Route::get('users', function()
    return View::make('users');

When i launch my site (localhost/laravel/public/users) It prints only:


enter image description here

what's wrong here? I'm using laravel 5

Thanks in advance, i'm newbie with laravel


@extends can't be indented, you can't put anything before it even whitespace.

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

1条回答 默认 最新

  • 已采纳
    douxi4287 douxi4287 2015-08-02 14:57

    I think in Laravel 5 you cannot use return View::make('users'); That's only for pure HTML content (already compiled). If you want to use blade templates, you should instead use :

    return view('users');
    点赞 评论 复制链接分享