Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel 4 plug-in system

I looking for some plugin structure for Laravel based applications.

For example a forum software, a cms or a e-commerce application can benefit from a plugin structure.

My question is what is the best way to implement this plugin system so that third party plugins can extend the application. The main issue is that it should be dynamically extendible and users should be able to install these plugins easily without messing with the app code.

This question also extends to themes but thats another question. Any ideas?

like image 943
Sinan Avatar asked Nov 01 '22 16:11

Sinan


1 Answers

Laravel is a framework, not a CMS like Wordpress or Joomla, so plugin system that fits everybody may be quite hard to create as Laravel can be used in many ways, but I can really see the benefit of easy packages in some contexts.

The Packagist has been already mentioned and it doesn't solve directly your problem but how about:

  1. Find good usable packages from Packagist for the purposes you need
  2. Define common plugin architecture (common API for binding things together, installer, package format, migration, updates etc) on top of Packagist packages
  3. Create installer that fetches packages via Packagist/Composer and adds sets sane default settings and configuration for the packages and integrates them into the defined plugin architecture
  4. Document and plan this really well and the others will soon follow
like image 162
trm42 Avatar answered Nov 07 '22 22:11

trm42