相关疑难解决方法(0)

在Laravel中模板化

我正在尝试让我的默认模板与Laravel一起使用.我来自Codeigniter和Phil Sturgeon的模板系统,所以我试图以类似的方式做到这一点.任何人都可以帮我解决我错过/做错的事吗?谢谢!

//default.blade.php (located in layouts/default)
<html>
    <title>{{$title}}</title>
    <body>
    {{$content}}
    </body>
</html>
//end default.blade.php

//home.blade.php (index view including header and footer partials)
@layout('layouts.default')
@include('partials.header')
//code
@include('partials.footer')
//end home

//routes.php (mapping route to home controller)
Route::controller( 'home' );
//end

//home.php (controller)
<?php
class Home_Controller extends Base_Controller {
    public $layout = 'layouts.default';
    public function action_index()
    {   
        $this->layout->title = 'title';
        $this->layout->content = View::make( 'home' );
    }
}
//end
Run Code Online (Sandbox Code Playgroud)

php laravel laravel-3

27
推荐指数
1
解决办法
3万
查看次数

如何在Laravel5中更改视图文件夹?

我正在使用Laravel 5和AngularJS开发Web应用程序.我正在为客户端使用纯angularJS应用程序,我将客户端应用程序文件(视图)放在我的public文件夹中.

在Laravel 4中,我可以从bootstrap/start.php文件中更改路径.但是在Laravel 5中,我看不到start.php文件.那么我在哪里更改Laravel 5中的配置?

php laravel angularjs laravel-5

14
推荐指数
1
解决办法
8861
查看次数

标签 统计

laravel ×2

php ×2

angularjs ×1

laravel-3 ×1

laravel-5 ×1