Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverbj committed Jan 24, 2023
1 parent 1901486 commit cf1cbd3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 21 deletions.
34 changes: 14 additions & 20 deletions src/CordServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,25 @@

namespace Oliverbj\Cord;

use Oliverbj\Cord\Commands\CordCommand;
use Spatie\LaravelPackageTools\Package;
use Spatie\LaravelPackageTools\PackageServiceProvider;
use Illuminate\Support\ServiceProvider;

class CordServiceProvider extends PackageServiceProvider
class CordServiceProvider extends ServiceProvider
{
public function configurePackage(Package $package): void
{
/*
* This class is a Package Service Provider
*
* More info: https://github.com/spatie/laravel-package-tools
*/
$package
->name('cord')
->hasConfigFile()
->hasViews()
->hasMigration('create_cord_table')
->hasCommand(CordCommand::class);
}

public function register()
{
$this->app->singleton('cord', function () {
$this->app->bind('cord', function ($app) {
return new Cord();
});

$this->mergeConfigFrom(__DIR__.'/../config/config.php', 'cord');
}

public function boot()
{
if ($this->app->runningInConsole()) {
$this->publishes([
__DIR__.'/../config/config.php' => config_path('cord.php'),
], 'config');
}
}
}
3 changes: 2 additions & 1 deletion src/Facades/Cord.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class Cord extends Facade
{
protected static function getFacadeAccessor()
{
return \Oliverbj\Cord\Cord::class;
//return \Oliverbj\Cord\Cord::class;
return 'cord';
}
}

0 comments on commit cf1cbd3

Please sign in to comment.