laravel-bootstrap icon indicating copy to clipboard operation
laravel-bootstrap copied to clipboard

Some sample code for integrating with a frontend

Open danielwashbrook opened this issue 11 years ago • 2 comments

Hi, I'm super pumped about this package. I really like how the backend is decoupled from a developer's frontend. I was wondering if we could put together some sample code on how one would integrate, say posts or galleries, into their frontend.

It looks like we have these models: Posts Galleries Settings Blocks Uploads User

So in a custom controller, you can start with use Davzie\LaravelBootstrap\Posts\Posts;

then initialize the Posts model with: $posts = new Posts();

But it looks like there's an interface to PostsRepository that has some useful functions. Any suggestions on how we'd tap into those? Is there an API reference to other methods for other models we could use?

Thanks! I really appreciate everything this package is doing.

danielwashbrook avatar Feb 02 '14 23:02 danielwashbrook

Hi Mate,

Take a look at the docs as I’ve got a link to a YouTube playlist on there that shows basic setup. Over the next few days I’ll be expanding to show how to access the data and why to use the repository instead of the Posts model directly for example.

Thanks for the great feedback. always nice to hear people using it :)

Cheers,

Dave

On 2 February 2014 at 23:29:12, Daniel Washbrook ([email protected]) wrote:

Hi, I'm super pumped about this package. I really like how the backend is decoupled from a developer's frontend. I was wondering if we could put together some sample code on how one would integrate, say posts or galleries, into their frontend.

It looks like we have these models: Posts Galleries Settings Blocks Uploads User

So in a custom controller, you can start with use Davzie\LaravelBootstrap\Posts\Posts;

then initialize the Posts model with: $posts = new Posts();

But it looks like there's an interface to PostsRepository that has some useful functions. Any suggestions on how we'd tap into those? Is there an API reference to other methods for other models we could use?

Thanks! I really appreciate everything this package is doing.

— Reply to this email directly or view it on GitHub.

davzie avatar Feb 03 '14 10:02 davzie

Thanks Dave, I look forward to it!

danielwashbrook avatar Feb 03 '14 17:02 danielwashbrook