Commit 90435edd authored by Claudio Ludovico Panetta's avatar Claudio Ludovico Panetta 🇺🇸

Fix issues

parent d35a87d9
/vendor
composer.phar
composer.lock
.DS_Store
.idea
......@@ -22,7 +22,7 @@
"Ludo237\\Slugify\\": "src/"
},
"files": [
"src/helper.php"
"src/helpers.php"
]
},
"autoload-dev": {
......
......@@ -10,6 +10,13 @@ use Illuminate\Support\ServiceProvider;
*/
final class SlugifyServiceProvider extends ServiceProvider
{
/**
* Indicates if loading of the provider is deferred.
*
* @var bool
*/
protected $defer = false;
/**
* Perform post-registration booting of services.
*
......@@ -17,11 +24,6 @@ final class SlugifyServiceProvider extends ServiceProvider
*/
public function boot()
{
// $this->loadTranslationsFrom(__DIR__."/../resources/lang", "ludo237");
// $this->loadViewsFrom(__DIR__."/../resources/views", "ludo237");
// $this->loadMigrationsFrom(__DIR__."/../database/migrations");
// $this->loadRoutesFrom(__DIR__."/routes.php");
// Publishing is only necessary when using the CLI.
if ($this->app->runningInConsole()) {
......@@ -29,24 +31,6 @@ final class SlugifyServiceProvider extends ServiceProvider
$this->publishes([
__DIR__ . "/../config/slugify.php" => config_path("slugify.php"),
], "slugify.config");
// Publishing the views.
/*$this->publishes([
__DIR__."/../resources/views" => base_path("resources/views/vendor/ludo237"),
], "slugify.views");*/
// Publishing assets.
/*$this->publishes([
__DIR__."/../resources/assets" => public_path("vendor/ludo237"),
], "slugify.views");*/
// Publishing the translation files.
/*$this->publishes([
__DIR__."/../resources/lang" => resource_path("lang/vendor/ludo237"),
], "slugify.views");*/
// Registering package commands.
// $this->commands([]);
}
}
......@@ -60,9 +44,11 @@ final class SlugifyServiceProvider extends ServiceProvider
$this->mergeConfigFrom(__DIR__ . "/../config/slugify.php", "slugify");
// Register the service the package provides.
$this->app->singleton("slugify", function () {
$this->app->singleton(Slugify::class, function () {
return new Slugify($this->app);
});
$this->app->alias(Slugify::class, "slugify");
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment