Skip to content
A bridge to SMF that can be used in Laravel applications
PHP HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
resources/views/smf
src/SmfBridge
DCO.txt
LICENSE
README.md
composer.json

README.md

Laravel SMF Bridge

A bridge to SMF that can be used in Laravel application

laravel5.8 SMF2.1 License

Installing

Using Composer, run the following in your project

$ composer require sycho/laravel-smf-bridge

After that, run the following

$ php artisan vendor:publish

If you're given a list to chose from, choose Provider: SmfBridge\ServiceProvider

Configuration

You will find an smf.php file in your config folder, you have to set the path to SMF's SSI.php file for the bridge to work.

Hooks

You can add smf hooks by following these steps:

  1. Switch auto_boot to false
  2. Create a Bridge Class which extends SmfBridge\Bridge, the file will autoload if put under App\SMF
  3. Create a new Service Provider
  4. Instantiate the class using the following hook
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        $this->app->booted(function() {
            $smfbridge = new SmfBridge();
        });
    }
  1. Add new methods to your new class, the method name must be by the name of any existing SMF hook example
    /**
     * Hook
     */
    public static function integrate_menu_buttons(&$menu_buttons)
    {
        $menu_buttons = [
            ...
        ];
    }

Contributing

Sign-off your commits, to acknowledge your submission under the license of the project.

Example: Signed-off-by: Your Name <youremail@example.com>

License

This package is released under the MIT License. A full copy of this license is included in the package file.

You can’t perform that action at this time.