davzie/laravel-bootstrap

Show posts, galleries etc

luki922 opened this issue · 4 comments

I need write new controller for show posts, galleries form database in front-end?

Hi Luki,

The front-end code is whatever you make it. You can access the data by using the bound class in a controller:

public function __construct ( Davzie\LaravelBootstrap\Posts\PostsInterface $posts ){
$this->model = $posts;
}

public function getIndex()
{
return $this->model->getAll();
}

Or you can access it anywhere using the IoC Container:

$postsModel = App::make( 'Davzie\LaravelBootstrap\Posts\PostsInterface' );

Dave

Do you know how I would go about implementing pagination with posts? Is that not included with this package?

I apologize if i'm annoying you at all, i'm having questions because I'm building a site with this package. :)

You’ll need to perhaps take this package and create your own slant on things, taking it out of composer’s ability to update and overwrite your changes etc.

I think the base controller has a getIndex() method that gets the objects.

I guess there you’d need to do some pagination on the object based on get parameters or something. Apologies for the vagueness, it’s been a while since I looked at this project and I’m concentrating on stuff that makes me money :(

I’m just one of those ass-hole Open Source guys who don’t support the code they put out haha, sorry!

On 3 December 2013 at 00:37:30, James Gray (notifications@github.com) wrote:

Do you know how I would go about implementing pagination with posts? Is that not included with this package?

I apologize if i'm annoying you at all, i'm having questions because I'm building a site with this package. :)


Reply to this email directly or view it on GitHub.

No need to apologize - thanks for your help, God bless.