Laravel share package

When building websites you most likely have social share buttons on your pages, adding them can be a repetitive task. This Laravel share package solves this issue.

After following the installation instructions you can add social share buttons to your page like this.

Share::page('http://blog.jorenvanhocht.be')->facebook();

You can generate one share link, but you can also generate all available services at once, just by chaining the service names.

Share::page('http://jorenvanhocht.be', 'Share title')
    ->facebook()
    ->twitter()
    ->googlePlus()
    ->linkedin('Extra linkedin summary can be passed here');

At the time of this writing the following services are available:

  • Facebook
  • Twitter
  • Google Plus
  • Linkedin

The source code can be found on Github and the package is installable through composer.

Laravel 5.3 – Multiple Migration Paths

A awesome new feature coming to Laravel 5.3 is the ability to have multiple migration paths.

This feature comes in handy for all package developers and of course for all package users. Currently when a package wants to use migrations you have to use php artisan migrate to run your own migrations and php artisan migrate –provider”Package\ServiceProvider” to migrate package migration files.

Once Laravel 5.3 has been released you will be able to register multiple migrations paths like this:

$this->loadMigrationsFrom('path/to/migrations/folder');

from in a service provider for example. The end user can now migrate all the migrations while only using php artisan migrate. There is no need to look all the providers up to migrate package migrations.