Added Auth
This commit is contained in:
parent
e6c4eb2009
commit
8b98db74a2
@ -6,5 +6,5 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
|
|
||||||
class Benutzer extends User
|
class Benutzer extends User
|
||||||
{
|
{
|
||||||
protected $table = "benutzer";
|
protected $table = "users";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,4 +7,13 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
class Eintragung extends Model
|
class Eintragung extends Model
|
||||||
{
|
{
|
||||||
protected $table = "eintragungen";
|
protected $table = "eintragungen";
|
||||||
|
protected $dates = ['kann_ab', 'kann_bis'];
|
||||||
|
|
||||||
|
public function veranstaltung(){
|
||||||
|
return $this->belongsTo('App\Veranstaltung');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function user(){
|
||||||
|
return $this->belongsTo('App\User');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -51,6 +51,7 @@ class RegisterController extends Controller
|
|||||||
'name' => 'required|string|max:255',
|
'name' => 'required|string|max:255',
|
||||||
'email' => 'required|string|email|max:255|unique:users',
|
'email' => 'required|string|email|max:255|unique:users',
|
||||||
'password' => 'required|string|min:6|confirmed',
|
'password' => 'required|string|min:6|confirmed',
|
||||||
|
'anzeigename' => 'required|string|unique:users'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -66,6 +67,8 @@ class RegisterController extends Controller
|
|||||||
'name' => $data['name'],
|
'name' => $data['name'],
|
||||||
'email' => $data['email'],
|
'email' => $data['email'],
|
||||||
'password' => bcrypt($data['password']),
|
'password' => bcrypt($data['password']),
|
||||||
|
'anzeigename' => $data['anzeigename'],
|
||||||
|
'telefon' => $data['telefon']
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
85
app/Http/Controllers/EintragController.php
Normal file
85
app/Http/Controllers/EintragController.php
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Eintragung;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class EintragController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Display a listing of the resource.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for creating a new resource.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function create()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Store a newly created resource in storage.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display the specified resource.
|
||||||
|
*
|
||||||
|
* @param \App\Eintragung $eintragung
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function show(Eintragung $eintragung)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for editing the specified resource.
|
||||||
|
*
|
||||||
|
* @param \App\Eintragung $eintragung
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function edit(Eintragung $eintragung)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the specified resource in storage.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @param \App\Eintragung $eintragung
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function update(Request $request, Eintragung $eintragung)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the specified resource from storage.
|
||||||
|
*
|
||||||
|
* @param \App\Eintragung $eintragung
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function destroy(Eintragung $eintragung)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
||||||
28
app/Http/Controllers/HomeController.php
Normal file
28
app/Http/Controllers/HomeController.php
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class HomeController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Create a new controller instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->middleware('auth');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the application dashboard.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
return view('home');
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -27,9 +27,10 @@ class VeranstaltungController extends Controller
|
|||||||
{
|
{
|
||||||
$v = new Veranstaltung();
|
$v = new Veranstaltung();
|
||||||
$v->beginn = \Carbon\Carbon::today();
|
$v->beginn = \Carbon\Carbon::today();
|
||||||
|
$v->gaeste = 0;
|
||||||
|
|
||||||
return view ('veranstaltung.create', ['model' =>
|
return view ('veranstaltung.create',
|
||||||
$v]);
|
$v);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -65,7 +66,9 @@ class VeranstaltungController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function show(Veranstaltung $veranstaltung)
|
public function show(Veranstaltung $veranstaltung)
|
||||||
{
|
{
|
||||||
|
if ($veranstaltung->has('eintragungen')) {
|
||||||
|
$veranstaltung->eintragungen;
|
||||||
|
}
|
||||||
return view('veranstaltung.show', $veranstaltung);
|
return view('veranstaltung.show', $veranstaltung);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
59
app/Policies/EintragPolicy.php
Normal file
59
app/Policies/EintragPolicy.php
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Policies;
|
||||||
|
|
||||||
|
use App\User;
|
||||||
|
use App\Eintragung;
|
||||||
|
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||||
|
|
||||||
|
class EintragPolicy
|
||||||
|
{
|
||||||
|
use HandlesAuthorization;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can view the eintragung.
|
||||||
|
*
|
||||||
|
* @param \App\User $user
|
||||||
|
* @param \App\Eintragung $eintragung
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function view(User $user, Eintragung $eintragung)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can create eintragungs.
|
||||||
|
*
|
||||||
|
* @param \App\User $user
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function create(User $user)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can update the eintragung.
|
||||||
|
*
|
||||||
|
* @param \App\User $user
|
||||||
|
* @param \App\Eintragung $eintragung
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function update(User $user, Eintragung $eintragung)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can delete the eintragung.
|
||||||
|
*
|
||||||
|
* @param \App\User $user
|
||||||
|
* @param \App\Eintragung $eintragung
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function delete(User $user, Eintragung $eintragung)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
||||||
64
app/Policies/VeranstaltungPolicy.php
Normal file
64
app/Policies/VeranstaltungPolicy.php
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Policies;
|
||||||
|
|
||||||
|
use App\User;
|
||||||
|
use App\Veranstaltung;
|
||||||
|
use Illuminate\Auth\Access\HandlesAuthorization;
|
||||||
|
|
||||||
|
class VeranstaltungPolicy
|
||||||
|
{
|
||||||
|
use HandlesAuthorization;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can view the veranstaltung.
|
||||||
|
*
|
||||||
|
* @param \App\User $user
|
||||||
|
* @param \App\Veranstaltung $veranstaltung
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function view(User $user, Veranstaltung $veranstaltung)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can create veranstaltungs.
|
||||||
|
*
|
||||||
|
* @param \App\User $user
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function create(User $user)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can update the veranstaltung.
|
||||||
|
*
|
||||||
|
* @param \App\User $user
|
||||||
|
* @param \App\Veranstaltung $veranstaltung
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function update(User $user, Veranstaltung $veranstaltung)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine whether the user can delete the veranstaltung.
|
||||||
|
*
|
||||||
|
* @param \App\User $user
|
||||||
|
* @param \App\Veranstaltung $veranstaltung
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function delete(User $user, Veranstaltung $veranstaltung)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
public function eintragen(User $user,Veranstaltung $veranstaltung)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
13
app/User.php
13
app/User.php
@ -8,14 +8,13 @@ use Illuminate\Foundation\Auth\User as Authenticatable;
|
|||||||
class User extends Authenticatable
|
class User extends Authenticatable
|
||||||
{
|
{
|
||||||
use Notifiable;
|
use Notifiable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The attributes that are mass assignable.
|
* The attributes that are mass assignable.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'name', 'email', 'password',
|
'name', 'email', 'password', 'anzeigename', 'telefon'
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -26,4 +25,14 @@ class User extends Authenticatable
|
|||||||
protected $hidden = [
|
protected $hidden = [
|
||||||
'password', 'remember_token',
|
'password', 'remember_token',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
public function eintragungen(){
|
||||||
|
return $this->hasMany('App\Eintragung');
|
||||||
|
}
|
||||||
|
public function einteilungen(){
|
||||||
|
return $this->hasMany('App\Einteilung');
|
||||||
|
}
|
||||||
|
public function arbeitszeiten(){
|
||||||
|
return $this->hasMany('App\Arbeitszeit');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,4 +11,12 @@ class Veranstaltung extends Model
|
|||||||
protected $fillable = ['name','beginn','ende','geaste','hinweise'];
|
protected $fillable = ['name','beginn','ende','geaste','hinweise'];
|
||||||
|
|
||||||
protected $dates = ['beginn', 'ende'];
|
protected $dates = ['beginn', 'ende'];
|
||||||
|
|
||||||
|
public function eintragungen(){
|
||||||
|
return $this->hasMany('App\Eintragung');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function einteilungen(){
|
||||||
|
return $this->hasMany('App\Einteilung');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
68
resources/views/auth/login.blade.php
Normal file
68
resources/views/auth/login.blade.php
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-8 col-md-offset-2">
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">Login</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
<form class="form-horizontal" role="form" method="POST" action="{{ route('login') }}">
|
||||||
|
{{ csrf_field() }}
|
||||||
|
|
||||||
|
<div class="form-group{{ $errors->has('email') ? ' has-error' : '' }}">
|
||||||
|
<label for="email" class="col-md-4 control-label">E-Mail Address</label>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
<input id="email" type="email" class="form-control" name="email" value="{{ old('email') }}" required autofocus>
|
||||||
|
|
||||||
|
@if ($errors->has('email'))
|
||||||
|
<span class="help-block">
|
||||||
|
<strong>{{ $errors->first('email') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group{{ $errors->has('password') ? ' has-error' : '' }}">
|
||||||
|
<label for="password" class="col-md-4 control-label">Password</label>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
<input id="password" type="password" class="form-control" name="password" required>
|
||||||
|
|
||||||
|
@if ($errors->has('password'))
|
||||||
|
<span class="help-block">
|
||||||
|
<strong>{{ $errors->first('password') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-md-6 col-md-offset-4">
|
||||||
|
<div class="checkbox">
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" name="remember" {{ old('remember') ? 'checked' : '' }}> Remember Me
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-md-8 col-md-offset-4">
|
||||||
|
<button type="submit" class="btn btn-primary">
|
||||||
|
Login
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<a class="btn btn-link" href="{{ route('password.request') }}">
|
||||||
|
Forgot Your Password?
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
46
resources/views/auth/passwords/email.blade.php
Normal file
46
resources/views/auth/passwords/email.blade.php
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-8 col-md-offset-2">
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">Reset Password</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
@if (session('status'))
|
||||||
|
<div class="alert alert-success">
|
||||||
|
{{ session('status') }}
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<form class="form-horizontal" role="form" method="POST" action="{{ route('password.email') }}">
|
||||||
|
{{ csrf_field() }}
|
||||||
|
|
||||||
|
<div class="form-group{{ $errors->has('email') ? ' has-error' : '' }}">
|
||||||
|
<label for="email" class="col-md-4 control-label">E-Mail Address</label>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
<input id="email" type="email" class="form-control" name="email" value="{{ old('email') }}" required>
|
||||||
|
|
||||||
|
@if ($errors->has('email'))
|
||||||
|
<span class="help-block">
|
||||||
|
<strong>{{ $errors->first('email') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-md-6 col-md-offset-4">
|
||||||
|
<button type="submit" class="btn btn-primary">
|
||||||
|
Send Password Reset Link
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
76
resources/views/auth/passwords/reset.blade.php
Normal file
76
resources/views/auth/passwords/reset.blade.php
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-8 col-md-offset-2">
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">Reset Password</div>
|
||||||
|
|
||||||
|
<div class="panel-body">
|
||||||
|
@if (session('status'))
|
||||||
|
<div class="alert alert-success">
|
||||||
|
{{ session('status') }}
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<form class="form-horizontal" role="form" method="POST" action="{{ route('password.request') }}">
|
||||||
|
{{ csrf_field() }}
|
||||||
|
|
||||||
|
<input type="hidden" name="token" value="{{ $token }}">
|
||||||
|
|
||||||
|
<div class="form-group{{ $errors->has('email') ? ' has-error' : '' }}">
|
||||||
|
<label for="email" class="col-md-4 control-label">E-Mail Address</label>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
<input id="email" type="email" class="form-control" name="email" value="{{ $email or old('email') }}" required autofocus>
|
||||||
|
|
||||||
|
@if ($errors->has('email'))
|
||||||
|
<span class="help-block">
|
||||||
|
<strong>{{ $errors->first('email') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group{{ $errors->has('password') ? ' has-error' : '' }}">
|
||||||
|
<label for="password" class="col-md-4 control-label">Password</label>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
<input id="password" type="password" class="form-control" name="password" required>
|
||||||
|
|
||||||
|
@if ($errors->has('password'))
|
||||||
|
<span class="help-block">
|
||||||
|
<strong>{{ $errors->first('password') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group{{ $errors->has('password_confirmation') ? ' has-error' : '' }}">
|
||||||
|
<label for="password-confirm" class="col-md-4 control-label">Confirm Password</label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<input id="password-confirm" type="password" class="form-control" name="password_confirmation" required>
|
||||||
|
|
||||||
|
@if ($errors->has('password_confirmation'))
|
||||||
|
<span class="help-block">
|
||||||
|
<strong>{{ $errors->first('password_confirmation') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-md-6 col-md-offset-4">
|
||||||
|
<button type="submit" class="btn btn-primary">
|
||||||
|
Reset Password
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
89
resources/views/auth/register.blade.php
Normal file
89
resources/views/auth/register.blade.php
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
@section('title','Neuer Benutzer');
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="row">
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">Register</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
<form class="form-horizontal" role="form" method="POST" action="{{ route('register') }}">
|
||||||
|
{{ csrf_field() }}
|
||||||
|
|
||||||
|
<div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}">
|
||||||
|
<label for="name" class="col-md-4 control-label">Name</label>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
<input id="name" type="text" class="form-control" name="name" value="{{ old('name') }}" required autofocus>
|
||||||
|
|
||||||
|
@if ($errors->has('name'))
|
||||||
|
<span class="help-block">
|
||||||
|
<strong>{{ $errors->first('name') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group{{ $errors->has('email') ? ' has-error' : '' }}">
|
||||||
|
<label for="email" class="col-md-4 control-label">E-Mail Address</label>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
<input id="email" type="email" class="form-control" name="email" value="{{ old('email') }}" required>
|
||||||
|
|
||||||
|
@if ($errors->has('email'))
|
||||||
|
<span class="help-block">
|
||||||
|
<strong>{{ $errors->first('email') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group{{ $errors->has('password') ? ' has-error' : '' }}">
|
||||||
|
<label for="password" class="col-md-4 control-label">Password</label>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
<input id="password" type="password" class="form-control" name="password" required>
|
||||||
|
|
||||||
|
@if ($errors->has('password'))
|
||||||
|
<span class="help-block">
|
||||||
|
<strong>{{ $errors->first('password') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="password-confirm" class="col-md-4 control-label">Confirm Password</label>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
<input id="password-confirm" type="password" class="form-control" name="password_confirmation" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="anzeigename" class="col-md-4 control-label">Anzeigename</label>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
<input id="anzeigename" type="text" class="form-control" name="anzeigename" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="telefon" class="col-md-4 col-form-label">Anzeigename</label>
|
||||||
|
|
||||||
|
<div class="col-md-6">
|
||||||
|
<input id="telefon" type="text" class="form-control" name="telefon" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="col-md-6 col-md-offset-4">
|
||||||
|
<button type="submit" class="btn btn-primary">
|
||||||
|
Register
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
17
resources/views/home.blade.php
Normal file
17
resources/views/home.blade.php
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-8 col-md-offset-2">
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">Dashboard</div>
|
||||||
|
|
||||||
|
<div class="panel-body">
|
||||||
|
You are logged in!
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
@ -1,5 +1,5 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head lang="{{ config('app.locale') }}">
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
@ -18,15 +18,22 @@
|
|||||||
|
|
||||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||||
<ul class="navbar-nav mr-auto">
|
<ul class="navbar-nav mr-auto">
|
||||||
|
|
||||||
|
@if(Auth::check())
|
||||||
<li class="nav-item active">
|
<li class="nav-item active">
|
||||||
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
|
<a class="nav-link" href="{{ route('home') }}">Home <span class="sr-only">(current)</span></a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{{ route('veranstaltung.index') }}">Veranstaltungen</a>
|
<a class="nav-link" href="{{ route('veranstaltung.index') }}">Veranstaltungen</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
@else
|
||||||
<a class="nav-link disabled" href="#">Disabled</a>
|
<li class="nav-item active">
|
||||||
|
<a class="nav-link" href="{{ route('register') }}">Register</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="{{ route('login') }}">Login</a>
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
</ul>
|
</ul>
|
||||||
<form class="form-inline my-2 my-lg-0">
|
<form class="form-inline my-2 my-lg-0">
|
||||||
<input class="form-control mr-sm-2" type="text" placeholder="Search">
|
<input class="form-control mr-sm-2" type="text" placeholder="Search">
|
||||||
|
|||||||
@ -6,31 +6,33 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-md-8">
|
<div class="form-group col-md-8">
|
||||||
<label for="name">Veranstaltungsname</label>
|
<label for="name">Veranstaltungsname</label>
|
||||||
<input type="text" name="name" class="form-control" id="title" aria-describedby="nameHelp" placeholder="Veranstaltungsnamen eingeben" value="{{ $model->name or "" }}" required>
|
<input type="text" name="name" class="form-control" id="title" aria-describedby="nameHelp" placeholder="Veranstaltungsnamen eingeben" value="{{ $name or "" }}" required>
|
||||||
<small id="nameHelp" class="form-text text-muted">Die Bezeichnung der Veranstaltung, welcher in der Übersicht angezeigt wird.</small>
|
<small id="nameHelp" class="form-text text-muted">Die Bezeichnung der Veranstaltung, welcher in der Übersicht angezeigt wird.</small>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-4">
|
<div class="form-group col-md-4">
|
||||||
<label for="gaeste">Anzahl der Gäste</label>
|
<label for="gaeste">Anzahl der Gäste</label>
|
||||||
<input type="number" name="gaeste" class="form-control" id="gaeste" aria-describedby="gaesteHelp" placeholder="Gastanzahl eingeben">
|
<input type="number" name="gaeste" class="form-control" id="gaeste" aria-describedby="gaesteHelp" placeholder="Gastanzahl eingeben" value="{{ $gaeste ?: 100 }}">
|
||||||
<small id="gaesteHelp" class="form-text text-muted">Die ungefähre Anzahl an Gästen zur Veranstaltung</small>
|
<small id="gaesteHelp" class="form-text text-muted">Die ungefähre Anzahl an Gästen zur Veranstaltung</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="beginn">Veranstaltungsbeginn</label>
|
<label for="beginn">Veranstaltungsbeginn</label>
|
||||||
<input type="datetime-local" name="beginn" class="form-control" id="beginn" aria-describedby="beginnHelp" placeholder="Veranstaltungsbeginn eingeben" value="{{ $model->beginn->format('Y-m-d\TH:i:s') }}" required>
|
<input type="datetime-local" name="beginn" class="form-control" id="beginn" aria-describedby="beginnHelp" placeholder="Veranstaltungsbeginn eingeben" value="{{ \Carbon\Carbon::parse($beginn)->format('Y-m-d\TH:i:s') }}" required>
|
||||||
<small id="beginnHelp" class="form-text text-muted">Der Zeitpunkt, an dem die Veranstaltung beginnt.</small>
|
<small id="beginnHelp" class="form-text text-muted">Der Zeitpunkt, an dem die Veranstaltung beginnt.</small>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-6">
|
<div class="form-group col-md-6">
|
||||||
<label for="ende">Veranstaltungsende</label>
|
<label for="ende">Veranstaltungsende</label>
|
||||||
<input type="datetime-local" name="ende" class="form-control" id="ende" aria-describedby="endeHelp" placeholder="Veranstaltungende eingeben">
|
<input type="datetime-local" name="ende" class="form-control" id="ende" aria-describedby="endeHelp" placeholder="Veranstaltungende eingeben" value="{{ !empty($ende) ? $ende : "" }}">
|
||||||
<small id="beginnHelp" class="form-text text-muted">Der Zeitpunkt, an dem die Veranstaltung wahrscheinlich endet. (optional)</small>
|
<small id="beginnHelp" class="form-text text-muted">Der Zeitpunkt, an dem die Veranstaltung wahrscheinlich endet. (optional)</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group col-md-12">
|
<div class="form-group col-md-12">
|
||||||
<label for="Hinweise">Hinweise</label>
|
<label for="Hinweise">Hinweise</label>
|
||||||
<textarea class="form-control" name="hinweise" id="hinweise" aria-describedby="hinweiseHelp" rows="3"></textarea>
|
<textarea class="form-control" name="hinweise" id="hinweise" aria-describedby="hinweiseHelp" rows="3">
|
||||||
|
{{ $hinweise or ""}}
|
||||||
|
</textarea>
|
||||||
<small id="hinweiseHelp" class="form-text text-muted">Hinweise zur Veranstalung</small>
|
<small id="hinweiseHelp" class="form-text text-muted">Hinweise zur Veranstalung</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -2,6 +2,8 @@
|
|||||||
@section('title', 'Veranstaltungen')
|
@section('title', 'Veranstaltungen')
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
<a class="btn btn-link" href="{{ route('veranstaltung.create') }}">Veranstaltung hinzufügen</a>
|
||||||
|
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -16,7 +18,7 @@
|
|||||||
<td>{{ $v->name }}</td>
|
<td>{{ $v->name }}</td>
|
||||||
<td>{{ $v->beginn->format('d.m.Y') }}</td>
|
<td>{{ $v->beginn->format('d.m.Y') }}</td>
|
||||||
<td>{{ $v->beginn->format('H:i') }}</td>
|
<td>{{ $v->beginn->format('H:i') }}</td>
|
||||||
<td>
|
<td class="row">
|
||||||
<a class="btn btn-link m-0" href="{{ route('veranstaltung.show', [$v]) }}">Details</a>
|
<a class="btn btn-link m-0" href="{{ route('veranstaltung.show', [$v]) }}">Details</a>
|
||||||
<a class="btn btn-link m-0" href="{{ route('veranstaltung.edit', [$v]) }}">Bearbeiten</a>
|
<a class="btn btn-link m-0" href="{{ route('veranstaltung.edit', [$v]) }}">Bearbeiten</a>
|
||||||
<a class="btn btn-link m-0" href="{{ route('veranstaltung.enter', [$v]) }}">Eintragen</a>
|
<a class="btn btn-link m-0" href="{{ route('veranstaltung.enter', [$v]) }}">Eintragen</a>
|
||||||
|
|||||||
@ -30,6 +30,16 @@
|
|||||||
<dd class="col-md-10">
|
<dd class="col-md-10">
|
||||||
{{ $hinweise }}
|
{{ $hinweise }}
|
||||||
</dd>
|
</dd>
|
||||||
|
<dt class="col-md-2">
|
||||||
|
Eintragungen
|
||||||
|
</dt>
|
||||||
|
<dd class="col-md-10">
|
||||||
|
<ul>
|
||||||
|
@foreach ($eintragungen as $eintrag)
|
||||||
|
<li> {{ $eintrag->user_id OR "keiner"}}
|
||||||
|
@endforeach
|
||||||
|
</ul>
|
||||||
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<hr/>
|
<hr/>
|
||||||
<a class="btn btn-link" href="{{ route('veranstaltung.edit', ['id' => $id]) }}">Bearbeiten</a>
|
<a class="btn btn-link" href="{{ route('veranstaltung.edit', ['id' => $id]) }}">Bearbeiten</a>
|
||||||
|
|||||||
@ -15,6 +15,12 @@ Route::get('/', function () {
|
|||||||
return view('welcome');
|
return view('welcome');
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::get('veranstaltung/{veranstaltung}/enter', 'VeranstaltungController@enter')
|
Route::get('veranstaltung/{veranstaltung}/eintragen', 'VeranstaltungController@enter')
|
||||||
->name('veranstaltung.enter');
|
->name('veranstaltung.enter');
|
||||||
Route::resource('veranstaltung','VeranstaltungController');
|
Route::resource('veranstaltung','VeranstaltungController');
|
||||||
|
|
||||||
|
Route::resource('eintrag','EintragController');
|
||||||
|
|
||||||
|
Auth::routes();
|
||||||
|
|
||||||
|
Route::get('/home', 'HomeController@index')->name('home');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user