Skip to content

Commit 37a3e5f

Browse files
committed
LCO: Strategies section - examples simplified.
1 parent de0c031 commit 37a3e5f

File tree

1 file changed

+5
-22
lines changed

1 file changed

+5
-22
lines changed

README.md

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -46,41 +46,27 @@ But if your application is deployed on a several nodes, which can run artisan co
4646
You can change strategy in your console command class, by specifying `$overlappingStrategy` field:
4747
4848
```php
49-
namespace App\Console\Commands;
50-
51-
use Illuminate\Console\Command;
52-
use Illuminated\Console\WithoutOverlapping;
53-
5449
class Foo extends Command
5550
{
5651
use WithoutOverlapping;
5752
58-
protected $signature = 'foo';
59-
protected $description = 'Some dummy command';
53+
// ...
54+
6055
protected $overlappingStrategy = 'database';
6156
62-
public function handle()
63-
{
64-
$this->info('Foo! Bar! Baz!');
65-
}
57+
// ...
6658
}
6759
6860
```
6961
7062
Or by using `setOverlappingStrategy()` method:
7163
7264
```php
73-
namespace App\Console\Commands;
74-
75-
use Illuminate\Console\Command;
76-
use Illuminated\Console\WithoutOverlapping;
77-
7865
class Foo extends Command
7966
{
8067
use WithoutOverlapping;
8168
82-
protected $signature = 'foo';
83-
protected $description = 'Some dummy command';
69+
// ...
8470
8571
public function __construct()
8672
{
@@ -90,9 +76,6 @@ class Foo extends Command
9076
$this->setOverlappingStrategy($strategy);
9177
}
9278
93-
public function handle()
94-
{
95-
$this->info('Foo! Bar! Baz!');
96-
}
79+
// ...
9780
}
9881
```

0 commit comments

Comments
 (0)