Remove helper function

This commit is contained in:
Jonny Barnes 2017-06-30 14:10:43 +01:00
parent c0ad5c3f7d
commit 3188ee2ba3
3 changed files with 0 additions and 60 deletions

View file

@ -1,58 +0,0 @@
<?php
namespace App\Console\Commands;
use App\Place;
use Illuminate\Console\Command;
class UpdatePlacesURLs extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'places:update-urls';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Copy any URLs in the place model to the new external URLs JSON column.';
/**
* The places collection.
*
* @var Illuminate\Database\Eloquent\Collection
*/
protected $places;
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
$this->places = Place::all();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
foreach ($this->places as $place) {
if ($place->foursqaure !== null) {
$place->external_urls = $place->foursquare;
}
}
$this->info('All Places have had their external URLs values updated to the new structure.');
}
}

View file

@ -17,7 +17,6 @@ class Kernel extends ConsoleKernel
Commands\ParseCachedWebMentions::class, Commands\ParseCachedWebMentions::class,
Commands\ReDownloadWebMentions::class, Commands\ReDownloadWebMentions::class,
Commands\GenerateToken::class, Commands\GenerateToken::class,
Commands\UpdatePlacesURLs::class,
]; ];
/** /**

View file

@ -2,7 +2,6 @@
## Version {next} ## Version {next}
- Transition to using a JSON column for external urls of places - Transition to using a JSON column for external urls of places
- Add a command to update external url structure of places
## Version 0.5.19 (2017-06-27) ## Version 0.5.19 (2017-06-27)
- Fix error in App\\WebMention.php - Fix error in App\\WebMention.php