srp module
This commit is contained in:
50
app/Http/Controllers/SRP/SRPController.php
Normal file
50
app/Http/Controllers/SRP/SRPController.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\SRP;
|
||||
|
||||
//Laravel Libraries
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
use DB;
|
||||
use Auth;
|
||||
|
||||
//User Libraries
|
||||
|
||||
//Models
|
||||
use App\Models\SRP\Fleet;
|
||||
use App\Models\SRP\FleetCommander;
|
||||
use App\Models\SRP\Ship;
|
||||
|
||||
class SRPController extends Controller
|
||||
{
|
||||
public function __construct() {
|
||||
$this->middleware('auth');
|
||||
$this->middelware('role:User');
|
||||
}
|
||||
|
||||
public function displaySrpForm() {
|
||||
return view('srp.srpform');
|
||||
}
|
||||
|
||||
public function storeSRPFile() {
|
||||
$this->validate($request, [
|
||||
'FC' => 'required',
|
||||
'FleetType' => 'required',
|
||||
'zKillboard' => 'required',
|
||||
'LossValue' => 'required',
|
||||
'ShipType' => 'required',
|
||||
]);
|
||||
|
||||
$fc = $request->FC;
|
||||
$fleetType = $request->FleetType;
|
||||
$zKill = $request->zKillboard;
|
||||
$loss = $request->LossValue;
|
||||
$ship = $request->ShipType;
|
||||
}
|
||||
|
||||
public function displaySRPRequests() {
|
||||
$this->middleware('permission:SRP');
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
27
app/Models/SRP/Fleet.php
Normal file
27
app/Models/SRP/Fleet.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Fleet extends Model
|
||||
{
|
||||
//Table Name
|
||||
protected $table = 'srp_fleet';
|
||||
|
||||
//Primary Key
|
||||
public $primaryKey = 'fleet_id';
|
||||
|
||||
//Timestamps
|
||||
public $timestamps = true;
|
||||
|
||||
//Fillable Items
|
||||
protected $fillable = [
|
||||
'fleet_id',
|
||||
'fleet_name',
|
||||
'fleet_commander',
|
||||
'fleet_commander_id',
|
||||
'fleet_type',
|
||||
'fleet_description',
|
||||
];
|
||||
}
|
||||
25
app/Models/SRP/Ship.php
Normal file
25
app/Models/SRP/Ship.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\SRP;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Ship extends Model
|
||||
{
|
||||
//Table Name
|
||||
protected $table = 'srp_ships';
|
||||
|
||||
//Primary Key
|
||||
public $primaryKey = 'id';
|
||||
|
||||
//Timestamps
|
||||
public $timestamps = true;
|
||||
|
||||
//Fillable Items
|
||||
protected $fillable = [
|
||||
'ship_type',
|
||||
'character_id',
|
||||
'zkillboard',
|
||||
'notes',
|
||||
];
|
||||
}
|
||||
49
database/migrations/2019_06_29_024757_create_srp_tables.php
Normal file
49
database/migrations/2019_06_29_024757_create_srp_tables.php
Normal file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateSrpTables extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
if(!Schema::hasTable('srp_ships')) {
|
||||
Schema::create('srp_ships', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('ship_type');
|
||||
$table->string('character_id');
|
||||
$table->string('zkillboard');
|
||||
$table->string('loss_values');
|
||||
$table->text('notes');
|
||||
});
|
||||
}
|
||||
|
||||
if(!Schema::hasTable('srp_fleets')) {
|
||||
Schema::create('srp_fleets', function(Blueprint $table) {
|
||||
$table->increments('fleet_id');
|
||||
$table->string('fleet_name');
|
||||
$table->string('fleet_commander');
|
||||
$table->string('fleet_commander_id');
|
||||
$table->string('fleet_type');
|
||||
$table->string('fleet_description');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('srp_ships');
|
||||
Schema::dropIfExists('srp_fleets');
|
||||
}
|
||||
}
|
||||
4
vendor/composer/ClassLoader.php
vendored
4
vendor/composer/ClassLoader.php
vendored
@@ -279,7 +279,7 @@ class ClassLoader
|
||||
*/
|
||||
public function setApcuPrefix($apcuPrefix)
|
||||
{
|
||||
$this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
|
||||
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -377,7 +377,7 @@ class ClassLoader
|
||||
$subPath = $class;
|
||||
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
||||
$subPath = substr($subPath, 0, $lastPos);
|
||||
$search = $subPath.'\\';
|
||||
$search = $subPath . '\\';
|
||||
if (isset($this->prefixDirsPsr4[$search])) {
|
||||
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
||||
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
||||
|
||||
3
vendor/composer/autoload_classmap.php
vendored
3
vendor/composer/autoload_classmap.php
vendored
@@ -17,6 +17,7 @@ return array(
|
||||
'App\\Console\\Commands\\UpdateMoonRental' => $baseDir . '/app/Console/Commands/Moons/UpdateMoonRental.php',
|
||||
'App\\Console\\Kernel' => $baseDir . '/app/Console/Kernel.php',
|
||||
'App\\Exceptions\\Handler' => $baseDir . '/app/Exceptions/Handler.php',
|
||||
'App\\Fleet' => $baseDir . '/app/Models/SRP/Fleet.php',
|
||||
'App\\Http\\Controllers\\Auth\\EsiScopeController' => $baseDir . '/app/Http/Controllers/Auth/EsiScopeController.php',
|
||||
'App\\Http\\Controllers\\Auth\\LoginController' => $baseDir . '/app/Http/Controllers/Auth/LoginController.php',
|
||||
'App\\Http\\Controllers\\Contracts\\ContractAdminController' => $baseDir . '/app/Http/Controllers/Contracts/ContractAdminController.php',
|
||||
@@ -98,6 +99,8 @@ return array(
|
||||
'App\\Models\\Moon\\Moon' => $baseDir . '/app/Models/Moon/Moon.php',
|
||||
'App\\Models\\Moon\\OrePrice' => $baseDir . '/app/Models/Moon/OrePrice.php',
|
||||
'App\\Models\\Moon\\Price' => $baseDir . '/app/Models/Moon/Price.php',
|
||||
'App\\Models\\SRP\\FleetCommander' => $baseDir . '/app/Models/SRP/FleetCommander.php',
|
||||
'App\\Models\\SRP\\Ship' => $baseDir . '/app/Models/SRP/Ship.php',
|
||||
'App\\Models\\ScheduledTask\\ScheduleJob' => $baseDir . '/app/Models/ScheduledTask/ScheduleJob.php',
|
||||
'App\\Models\\Stock\\Asset' => $baseDir . '/app/Models/Stock/Asset.php',
|
||||
'App\\Models\\Structure\\Service' => $baseDir . '/app/Models/Structure/Service.php',
|
||||
|
||||
3
vendor/composer/autoload_static.php
vendored
3
vendor/composer/autoload_static.php
vendored
@@ -477,6 +477,7 @@ class ComposerStaticInitc3f953f8a7291d41a76e1664339777c9
|
||||
'App\\Console\\Commands\\UpdateMoonRental' => __DIR__ . '/../..' . '/app/Console/Commands/Moons/UpdateMoonRental.php',
|
||||
'App\\Console\\Kernel' => __DIR__ . '/../..' . '/app/Console/Kernel.php',
|
||||
'App\\Exceptions\\Handler' => __DIR__ . '/../..' . '/app/Exceptions/Handler.php',
|
||||
'App\\Fleet' => __DIR__ . '/../..' . '/app/Models/SRP/Fleet.php',
|
||||
'App\\Http\\Controllers\\Auth\\EsiScopeController' => __DIR__ . '/../..' . '/app/Http/Controllers/Auth/EsiScopeController.php',
|
||||
'App\\Http\\Controllers\\Auth\\LoginController' => __DIR__ . '/../..' . '/app/Http/Controllers/Auth/LoginController.php',
|
||||
'App\\Http\\Controllers\\Contracts\\ContractAdminController' => __DIR__ . '/../..' . '/app/Http/Controllers/Contracts/ContractAdminController.php',
|
||||
@@ -558,6 +559,8 @@ class ComposerStaticInitc3f953f8a7291d41a76e1664339777c9
|
||||
'App\\Models\\Moon\\Moon' => __DIR__ . '/../..' . '/app/Models/Moon/Moon.php',
|
||||
'App\\Models\\Moon\\OrePrice' => __DIR__ . '/../..' . '/app/Models/Moon/OrePrice.php',
|
||||
'App\\Models\\Moon\\Price' => __DIR__ . '/../..' . '/app/Models/Moon/Price.php',
|
||||
'App\\Models\\SRP\\FleetCommander' => __DIR__ . '/../..' . '/app/Models/SRP/FleetCommander.php',
|
||||
'App\\Models\\SRP\\Ship' => __DIR__ . '/../..' . '/app/Models/SRP/Ship.php',
|
||||
'App\\Models\\ScheduledTask\\ScheduleJob' => __DIR__ . '/../..' . '/app/Models/ScheduledTask/ScheduleJob.php',
|
||||
'App\\Models\\Stock\\Asset' => __DIR__ . '/../..' . '/app/Models/Stock/Asset.php',
|
||||
'App\\Models\\Structure\\Service' => __DIR__ . '/../..' . '/app/Models/Structure/Service.php',
|
||||
|
||||
Reference in New Issue
Block a user