Added Auth
This commit is contained in:
@@ -51,6 +51,7 @@ class RegisterController extends Controller
|
||||
'name' => 'required|string|max:255',
|
||||
'email' => 'required|string|email|max:255|unique:users',
|
||||
'password' => 'required|string|min:6|confirmed',
|
||||
'anzeigename' => 'required|string|unique:users'
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -66,6 +67,8 @@ class RegisterController extends Controller
|
||||
'name' => $data['name'],
|
||||
'email' => $data['email'],
|
||||
'password' => bcrypt($data['password']),
|
||||
'anzeigename' => $data['anzeigename'],
|
||||
'telefon' => $data['telefon']
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
@@ -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->beginn = \Carbon\Carbon::today();
|
||||
$v->gaeste = 0;
|
||||
|
||||
return view ('veranstaltung.create', ['model' =>
|
||||
$v]);
|
||||
return view ('veranstaltung.create',
|
||||
$v);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -65,7 +66,9 @@ class VeranstaltungController extends Controller
|
||||
*/
|
||||
public function show(Veranstaltung $veranstaltung)
|
||||
{
|
||||
|
||||
if ($veranstaltung->has('eintragungen')) {
|
||||
$veranstaltung->eintragungen;
|
||||
}
|
||||
return view('veranstaltung.show', $veranstaltung);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user