Read these two pages and I think you'll be more familiar with the api. If you're practicing with it, as you mentioned, I suggest first using it in the standard way.
Yeah I also found that it bit retarded. The short answer is that's just how it works.
I ended using the default controller to deal with the problem and sett all the default stuff that was in my view
class BaseController extends Controller {
/**
* Setup the layout used by the controller.
*
* @return void
*/
// By default overide to use layouts.main
protected $layout = 'layouts.main';
protected function setupLayout() {
if ( ! is_null( $this->layout ) ) {
$this->layout = View::make( $this->layout );
}
// Default Layout configuration
$this->layout->title = 'default title';
$this->layout->header = View::make( 'home.header' );
$this->layout->nav = View::make( 'home.nav' );
}
}
AnthonyVipond said:
Read these two pages and I think you'll be more familiar with the api. If you're practicing with it, as you mentioned, I suggest first using it in the standard way.
AnthonyVipond said:
Read these two pages and I think you'll be more familiar with the api. If you're practicing with it, as you mentioned, I suggest first using it in the standard way.
As an newbie, only thing we could do is Google and check documents when not as expect, unfortunate, answer is so hard to get if not lucky enough that someone has exactly same scenario.
In my case, I do follow your suggestion to read those papers but still no clue why the second code not working? what is their difference?
By the way, I download many your tutorials, pretty good, hopefully I could integrated these skills into my own project soon. Thanks.
If you are trying to use
return View::make('admin.todo.index',compact('var'));
Then your ...admin/todo/index.blade.php
should be :
@extends('admin.layouts.default')
@section('content')
...
@stop
mcraz said:
If you are trying to use
return View::make('admin.todo.index',compact('var'));
Then your
...admin/todo/index.blade.php
should be :@extends('admin.layouts.default') @section('content') ... @stop
Mcraz, thanks, it work, now I have some idea what this 2 methods work. One more question, why
{{$var->links()}}
get me only Page Bar but no summary message like Showing 1 to 2 of 2 entries? Such message seems should came with paginate? Again, I follow tutorial but missing this Summary message, no clue after I Google the web.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community