forms
This commit is contained in:
@@ -30,8 +30,8 @@ class Hauling extends Controller
|
||||
*/
|
||||
public function displayFormResults(Request $request) {
|
||||
$this->validate($request, [
|
||||
'name1' => 'required',
|
||||
'name2' => 'required',
|
||||
'pickup' => 'required',
|
||||
'destination' => 'required',
|
||||
'collateral' => 'required',
|
||||
'size' => 'required',
|
||||
]);
|
||||
@@ -40,14 +40,18 @@ class Hauling extends Controller
|
||||
$collateral = $request->collateral;
|
||||
$time = '1 week';
|
||||
$duration = '3 days';
|
||||
$pickup = $request->pickup;
|
||||
$destination = $request->destination;
|
||||
|
||||
$hHelper = new HaulingHelper;
|
||||
|
||||
$jumps = $hHelper->JumpsBetweenSystems($request->name1, $request->name2);
|
||||
$jumps = $hHelper->JumpsBetweenSystems($pickup, $destination);
|
||||
|
||||
if($size > 0 && $size <= 57500) {
|
||||
if($size > 0 && $size <= 8000) {
|
||||
$cost = $jumps* 600000;
|
||||
} else if($size > 8000 && $size <= 57500) {
|
||||
$cost = $jumps * 750000;
|
||||
} else if($size > 57500 && $size < 800000) {
|
||||
} else if($size > 57500 && $size <= 800000) {
|
||||
$cost = $jumps * 1000000;
|
||||
} else {
|
||||
$cost = -1;
|
||||
@@ -58,7 +62,9 @@ class Hauling extends Controller
|
||||
->with('collateral', $collateral)
|
||||
->with('size', $size)
|
||||
->with('time', $time)
|
||||
->with('duration', $duration);
|
||||
->with('duration', $duration)
|
||||
->with('pickup', $pickup)
|
||||
->with('destination', $destination);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,6 +17,7 @@ class CreateSolarSystemsTable extends Migration
|
||||
Schema::create('solar_systems', function (Blueprint $table) {
|
||||
$table->string('name');
|
||||
$table->string('solar_system_id')->unique();
|
||||
$table->float('security_status', 3, 2);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ class SolarSystemSeeder extends Seeder
|
||||
SolarSystem::insert([
|
||||
'name' => $info->name,
|
||||
'solar_system_id' => $system,
|
||||
'security_status' => $info->security_status,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,50 @@
|
||||
@if(Auth::check())
|
||||
@extends('layouts.navbars.loggedin')
|
||||
@else
|
||||
@extends('layouts.navbars.loggedout')
|
||||
@endif
|
||||
|
||||
@extends('layouts.b4')
|
||||
@section('content')
|
||||
<br>
|
||||
<div class="container">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
|
||||
How to Make a Contract
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<ol>
|
||||
<li>Get a quote from <a href="https://evepraisal.com">EvePraisal</a> and set the sell value as the collateral.</li>
|
||||
<li>Issue the courier contracts as 'Private' to 'United Hauling'.</li>
|
||||
<li>If utilizing a container, please note in description</li>
|
||||
</ol>
|
||||
<br>
|
||||
Join our channel "United Hauling" in game for questions and/or concerns.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
Quote
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{!! Form::open(['action' => 'Hauling\HaulingController@displayFormResults', 'method' => 'POST']) !!}
|
||||
<div class="form-group">
|
||||
{{ Form::label('pickup', 'Pickup System') }}
|
||||
{{ Form::text('pickup', '', ['class' => 'form-control']) }}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{ Form::label('destination', 'Destination System') }}
|
||||
{{ Form::text('destination', '', ['class' => 'form-control']) }}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{ Form::label('size', 'Volume') }}
|
||||
{{ Form::text('size', '', ['class' => 'form-control']) }}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{ Form::label('collateral', 'Collateral') }}
|
||||
{{ Form::text('collateral', '', ['class' => 'form-control']) }}
|
||||
</div>
|
||||
<div class="form-group col-md-1">
|
||||
{{ Form::submit('Submit', ['class' => 'btn btn-primary']) }}
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -0,0 +1,66 @@
|
||||
@extends('layouts.b4')
|
||||
@section('content')
|
||||
<br>
|
||||
<div class="container">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
Your Query
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>Route</th>
|
||||
<td>{{ $pickup }} >> {{ $destination }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Warps</th>
|
||||
<td>{{ $jumps }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Volume</th>
|
||||
<td>{{ $size }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Collateral</th>
|
||||
<td>{{ $collateral }} ISK</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
Your Quote
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>Service Type</th>
|
||||
<td>Highsec</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Issue To</th>
|
||||
<td>United Hauling</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Price</th>
|
||||
<td>{{ $price }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Container Policy</th>
|
||||
<td>Containers allowed.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Expiration</th>
|
||||
<td>{{ $time }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Days To Complete</th>
|
||||
<td>{{ $duration }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -25,7 +25,11 @@
|
||||
<link rel="stylesheet" href="{{ asset('css/bootstrap.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
@include('layouts.navbar')
|
||||
@if(Auth::check())
|
||||
@extends('layouts.navbars.loggedin')
|
||||
@else
|
||||
@extends('layouts.navbars.loggedout')
|
||||
@endif
|
||||
<div class="container">
|
||||
@include('inc.messages')
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user