forked from s421507/eOSP2
Wyświetlanie jednostki wg. mvc
This commit is contained in:
parent
3c86dda370
commit
3e168bc3a5
@ -9,6 +9,14 @@ use App\fireStation;
|
|||||||
|
|
||||||
class fireStationController extends Controller
|
class fireStationController extends Controller
|
||||||
{
|
{
|
||||||
|
public function create(){
|
||||||
|
if(auth()->user() != null && auth()->user()->fireStationID != null ){
|
||||||
|
$fireStation = fireStation::find(auth()->user()->fireStationID);
|
||||||
|
return view('unit', ["fireStation" => $fireStation]);
|
||||||
|
} else{
|
||||||
|
return view('unit');
|
||||||
|
}
|
||||||
|
}
|
||||||
public function store()
|
public function store()
|
||||||
{
|
{
|
||||||
$this->validate(request(),[
|
$this->validate(request(),[
|
||||||
|
@ -15,20 +15,19 @@
|
|||||||
@if( auth()->check() )
|
@if( auth()->check() )
|
||||||
@if( auth()->user()->fireStationID == NULL)
|
@if( auth()->user()->fireStationID == NULL)
|
||||||
@include('inc.addFireStation')
|
@include('inc.addFireStation')
|
||||||
@elsegit
|
@else
|
||||||
@php $jednostka = \App\fireStation::find(auth()->user()->fireStationID); @endphp
|
|
||||||
<div>
|
<div>
|
||||||
<p><b>Nazwa:</b> {{ $jednostka-> name }}</p>
|
<p><b>Nazwa:</b> {{ $fireStation-> name }}</p>
|
||||||
<p><b>Województwo:</b> Wielkopolskie</p>
|
<p><b>Województwo:</b> {{ $fireStation-> voivodeship }}</p>
|
||||||
<p><b>Powiat:</b> Koniński</p>
|
<p><b>Powiat:</b> {{ $fireStation-> county }}</p>
|
||||||
<p><b>Gmina i numer ewidencyjny:</b> Skulsk 3010092</p>
|
<p><b>Gmina i numer ewidencyjny:</b> {{ $fireStation-> community }} {{ $fireStation-> number }}</p>
|
||||||
<p><b>Kod pocztowy, Miejscowość:</b> 62-560 Skulsk</p>
|
<p><b>Kod pocztowy, Miejscowość:</b> {{ $fireStation-> zipCode }} {{ $fireStation-> name }}</p>
|
||||||
<p><b>Ulica i numer:</b> Łuszczewo 81</p>
|
<p><b>Ulica i numer:</b> {{ $fireStation-> address }}</p>
|
||||||
<p><b>Szerokość i długość geograficzna:</b> 523113.08 | 182155.88</p>
|
<p><b>Szerokość i długość geograficzna:</b> {{ $fireStation-> latitude }} | {{ $fireStation-> longitude }}</p>
|
||||||
<p><b>KRS:</b> 0000003716</p>
|
<p><b>KRS:</b> {{ $fireStation-> KRS }}</p>
|
||||||
<p><b>NIP:</b> 665 524 497 69 </p>
|
<p><b>NIP:</b> {{ $fireStation-> NIP }} </p>
|
||||||
<p><b>Telefon:</b> ??? - ??? - ???</p>
|
<p><b>Telefon:</b> {{ $fireStation-> phoneNumber }}</p>
|
||||||
<p><b>E-mail:</b> twojanazwa@domena.com</p>
|
<p><b>E-mail:</b> {{ $fireStation-> email }}</p>
|
||||||
<hr>
|
<hr>
|
||||||
<p><b>Liczba członków:</b> 40</p>
|
<p><b>Liczba członków:</b> 40</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -28,9 +28,6 @@ Route::get('/straznica', function(){
|
|||||||
return view('depot');
|
return view('depot');
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::get('/jednostka', function(){
|
|
||||||
return view('unit');
|
|
||||||
});
|
|
||||||
|
|
||||||
Route::get('/pojazdy', function(){
|
Route::get('/pojazdy', function(){
|
||||||
return view('vehicles');
|
return view('vehicles');
|
||||||
@ -49,7 +46,7 @@ Route::get('/login', 'SessionsController@create');
|
|||||||
Route::post('/login', 'SessionsController@store');
|
Route::post('/login', 'SessionsController@store');
|
||||||
Route::get('/logout', 'SessionsController@destroy');
|
Route::get('/logout', 'SessionsController@destroy');
|
||||||
|
|
||||||
|
Route::get('/jednostka', 'fireStationController@create');
|
||||||
Route::post('/jednostka', 'fireStationController@store');
|
Route::post('/jednostka', 'fireStationController@store');
|
||||||
|
|
||||||
//Auth::routes();
|
//Auth::routes();
|
||||||
|
Loading…
Reference in New Issue
Block a user