changed a model around
This commit is contained in:
@@ -15,7 +15,7 @@ use App\Library\Esi\Esi;
|
||||
use Seat\Eseye\Exceptions\RequestFailedException;
|
||||
|
||||
//Models
|
||||
use App\Models\Moon\Moon;
|
||||
use App\Models\Moon\RentalMoon;
|
||||
use App\Models\MoonRent\MoonRental;
|
||||
use App\Models\Jobs\JobSendEveMail;
|
||||
use App\Models\Mail\SentMail;
|
||||
@@ -174,7 +174,7 @@ class MoonMailerCommand extends Command
|
||||
$today->hour = 0;
|
||||
|
||||
foreach($rentals as $rental) {
|
||||
$moon = Moon::where([
|
||||
$moon = RentalMoon::where([
|
||||
'System' => $rental->System,
|
||||
'Planet' => $rental->Planet,
|
||||
'Moon' => $rental->Moon,
|
||||
|
||||
@@ -19,7 +19,7 @@ use App\Models\Esi\EsiToken;
|
||||
use App\Models\Esi\EsiScope;
|
||||
use App\Models\Lookups\ItemLookup;
|
||||
use App\Models\MoonRent\MoonRental;
|
||||
use App\Models\Moon\Moon;
|
||||
use App\Models\Moon\RentalMoon;
|
||||
|
||||
class MoonLedgerController extends Controller
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@ use Carbon\Carbon;
|
||||
//Models
|
||||
use App\Models\Moon\Config;
|
||||
use App\Models\Moon\ItemComposition;
|
||||
use App\Models\Moon\Moon;
|
||||
use App\Models\Moon\RentalMoon;
|
||||
use App\Models\Moon\OrePrice;
|
||||
use App\Models\Moon\Price;
|
||||
use App\Models\MoonRent\MoonRental;
|
||||
@@ -157,7 +157,7 @@ class MoonsAdminController extends Controller
|
||||
//Setup calls to the MoonCalc class
|
||||
$moonCalc = new MoonCalc();
|
||||
//Get all of the moons from the database
|
||||
$moons = Moon::orderBy('System', 'asc')->get();
|
||||
$moons = RentalMoon::orderBy('System', 'asc')->get();
|
||||
//Declare the html variable and set it to null
|
||||
$table = array();
|
||||
//Set carbon dates as needed
|
||||
@@ -304,7 +304,7 @@ class MoonsAdminController extends Controller
|
||||
$spmn = array();
|
||||
|
||||
//Get the moons and put in order by System, Planet, then Moon number
|
||||
$moons = Moon::orderBy('System', 'ASC')
|
||||
$moons = RentalMoon::orderBy('System', 'ASC')
|
||||
->orderBy('Planet', 'ASC')
|
||||
->orderBy('Moon', 'ASC')
|
||||
->get();
|
||||
@@ -402,7 +402,7 @@ class MoonsAdminController extends Controller
|
||||
}
|
||||
|
||||
//Calculate the price of the moon for when it's updated
|
||||
$moon = Moon::where([
|
||||
$moon = RentalMoon::where([
|
||||
'System' => $system,
|
||||
'Planet' => $planet,
|
||||
'Moon' => $mn,
|
||||
|
||||
@@ -12,7 +12,7 @@ use Carbon\Carbon;
|
||||
//Models
|
||||
use App\Models\Moon\Config;
|
||||
use App\Models\Moon\ItemComposition;
|
||||
use App\Models\Moon\Moon;
|
||||
use App\Models\Moon\RentalMoon;
|
||||
use App\Models\Moon\OrePrice;
|
||||
use App\Models\Moon\Price;
|
||||
use App\Models\MoonRent\MoonRental;
|
||||
|
||||
@@ -16,7 +16,7 @@ use GuzzleHttp\Client;
|
||||
//Models
|
||||
use App\Models\Moon\Config;
|
||||
use App\Models\Moon\ItemComposition;
|
||||
use App\Models\Moon\Moon;
|
||||
use App\Models\Moon\RentalMoon;
|
||||
use App\Models\Moon\OrePrice;
|
||||
use App\Models\Moon\MineralPrice;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace App\Models\Moon;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Moon extends Model
|
||||
class RentalMoon extends Model
|
||||
{
|
||||
// Table Name
|
||||
protected $table = 'RentalMoons';
|
||||
|
||||
@@ -7,7 +7,7 @@ use Illuminate\Http\File;
|
||||
|
||||
//Models
|
||||
use App\Models\Moon\AllianceMoon;
|
||||
use App\Models\Moon\Moon;
|
||||
use App\Models\Moon\RentalMoon;
|
||||
|
||||
class MoonUpdateSeeder extends Seeder
|
||||
{
|
||||
@@ -138,7 +138,7 @@ class MoonUpdateSeeder extends Seeder
|
||||
foreach($lines as $line) {
|
||||
//If the moon is a rare moon, then either update it or add it.
|
||||
if($this->IsRMoon($line[3], $line[5], $line[7], $line[9])) {
|
||||
$count = Moon::where([
|
||||
$count = RentalMoon::where([
|
||||
'System' => $line[0],
|
||||
'Planet' => $line[1],
|
||||
'Moon' => $line[2],
|
||||
@@ -147,7 +147,7 @@ class MoonUpdateSeeder extends Seeder
|
||||
if($count == 0) {
|
||||
$region = $this->FindRegion($line[0]);
|
||||
|
||||
Moon::insert([
|
||||
RentalMoon::insert([
|
||||
'Region' => $region,
|
||||
'System' => $line[0],
|
||||
'Planet' => $line[1],
|
||||
@@ -168,7 +168,7 @@ class MoonUpdateSeeder extends Seeder
|
||||
$thirdQuantity = round($line[8] * 100);
|
||||
$fourthQuantity = round($line[10] * 100);
|
||||
|
||||
Moon::where([
|
||||
RentalMoon::where([
|
||||
'System' => $line[0],
|
||||
'Planet' => $line[1],
|
||||
'Moon' => $line[2],
|
||||
|
||||
@@ -6,7 +6,7 @@ use GuzzleHttp\Client;
|
||||
use Carbon\Carbon;
|
||||
|
||||
use App\Models\Moon\Config;
|
||||
use App\Models\Moon\Moon;
|
||||
use App\Models\Moon\RentalMoon;
|
||||
use App\Models\Moon\ItemComposition;
|
||||
use App\Models\Moon\OrePrice;
|
||||
use App\Models\Moon\MineralPrice;
|
||||
|
||||
Reference in New Issue
Block a user