Support the ongoing development of Laravel.io →
Packages Architecture

I'm developing a package that ties the Facebook SDK into Laravel. (Soon to be shared with you guys!)

I have a base class to interface with the SDK and a number of separate classes for working with other Facebook objects. Basically extending the functionality of the SDK Facebook provides.

I have a User class for handling permissions/tracking/anything related to the authenticated Facebook user. And I have a PageTab class for working within the context of a page tab. And I'll be adding more of these later.

So my question is, should I use multiple facades to interface with these separate classes? Like

FacebookPageTab::pageIsLiked();
FacebookUser::isLoggedIn();

Or should I just have a "Facebook" facade that does it all? I'm kind of new to Laravel so I'm trying to figure out how to implement a do-it-all facade. Maybe pointing the "Facebook" facade to an "Environment" class or something that lazy-loads the appropriate services? Not sure the best practice on that.

And this has been my first official post on .io! Yay! :) Thanks!

Last updated 2 years ago.
0

I think a single Facade would be much tidier to be honest

Last updated 2 years ago.
0

Yeah, I think that's kind of the direction I'm going. Thanks! :)

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

SammyK sammyk Joined 2 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.