created model for eve regions
This commit is contained in:
42
app/Console/Commands/GetEveRegions.php
Normal file
42
app/Console/Commands/GetEveRegions.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class GetEveRegions extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'command:name';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Command description';
|
||||
|
||||
/**
|
||||
* Create a new command instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
34
app/Jobs/Commands/Eve/GetEveRegionsJob.php
Normal file
34
app/Jobs/Commands/Eve/GetEveRegionsJob.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
|
||||
class GetEveRegionsJob implements ShouldQueue
|
||||
{
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the job.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
24
app/Models/Eve/EveRegion.php
Normal file
24
app/Models/Eve/EveRegion.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class EveRegion extends Model
|
||||
{
|
||||
//Table Name
|
||||
protected $table = 'eve_regions';
|
||||
|
||||
//Timestamps
|
||||
public $timestamps = false;
|
||||
|
||||
/**
|
||||
* Variables which are mass assignable
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'region_id',
|
||||
'region_name',
|
||||
];
|
||||
}
|
||||
@@ -13,6 +13,14 @@ class CreateBuyPublicContractsTable extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if(!Schema::hasTable('eve_regions')) {
|
||||
Schema::create('eve_regions', function (Blueprint $table) {
|
||||
$table->unsignedBigIncrements('id');
|
||||
$table->unsignedBigInteger('region_id');
|
||||
$table->string('region_name');
|
||||
});
|
||||
}
|
||||
|
||||
if(!Schema::hasTable('public_contracts')) {
|
||||
Schema::create('public_contracts', function(Blueprint $table) {
|
||||
$table->unsignedBigIncrements('id');
|
||||
|
||||
Reference in New Issue
Block a user