Skip to content
This repository has been archived by the owner on Sep 22, 2024. It is now read-only.

Commit

Permalink
fix: use app property
Browse files Browse the repository at this point in the history
  • Loading branch information
pactode committed Nov 23, 2020
1 parent 9b79e70 commit 9d0c83a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/SchedulingTasksServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class SchedulingTasksServiceProvider extends ServiceProvider
*/
public function boot()
{
if ($this->container->runningInConsole()) {
if ($this->app->runningInConsole()) {
$this->commands([
TaskMakeCommand::class,
]);
Expand All @@ -28,10 +28,10 @@ public function boot()
*/
public function register()
{
$this->container->singleton(TaskLoader::class, function ($app) {
$this->app->singleton(TaskLoader::class, function ($app) {
return new TaskLoader($app);
});

$this->container->alias(TaskLoader::class, 'task-loader');
$this->app->alias(TaskLoader::class, 'task-loader');
}
}
6 changes: 3 additions & 3 deletions src/TaskLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ class TaskLoader

public function __construct(Application $app)
{
$this->container = $app;
$this->app = $app;
}

public function loadFor(Schedule $schedule, array $exclude = [])
{
$namespace = $this->container->getNamespace();
$namespace = $this->app->getNamespace();

$path = $this->container->path('Console/Tasks');
$path = $this->app->path('Console/Tasks');

if (! is_dir($path)) {
return;
Expand Down

0 comments on commit 9d0c83a

Please sign in to comment.