Jan. 8, 2017, 11 p.m.
By : Eric A. Scuccimarra
I finished working on my Laravel package, which is the blog I use here (and also on my other site). I had this on my GitHub as a Laravel skeleton application, but after a few days of research and coding I now have it as a Laravel package, which can be installed via Composer. I did find a more comprehensive tutorial on writing Laravel packages, but I only just found this today after I had finished my package, so haven't really read through it.
The reason I started working on this package is because I have multiple sites that use the same code and I wanted to consolidate them so I wouldn't have to maintain two separate code bases, but the package is only in English and some of my sites are in French, so I guess my next step is adding translation to the package.
The package is on Packagist and can be installed with composer.
composer require escuccim/larablog
A few things that I struggled with and eventually figured out since my last post on this topic:
$this->publishes([
__DIR__.'/config/config.php' => config_path('blog.php'),
__DIR__ . '/resources/views' => base_path('resources/views/vendor/escuccim')
]);
$this->mergeConfigFrom(__DIR__.'/config/config.php', 'blog'); where 'blog' is the key for the config array.
$this->loadMigrationsFrom(__DIR__.'/database/migrations');
There is still work to be done, but I just marked my GitHub repo with a stable release version, so that's something.
There are no comments for this article.