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