Merge remote-tracking branch 'origin/master'
# Conflicts: # skolehjem/app/MenuPlan.php
This commit is contained in:
commit
dfd8420270
|
@ -1,19 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
||||
<data-source source="LOCAL" name="laravel" uuid="666d3dad-499f-4d99-8988-fd376e6db9e6">
|
||||
<data-source source="LOCAL" name="laravel.sqlite" uuid="bf392a85-1584-4a27-a552-e491a55b9410">
|
||||
<driver-ref>sqlite.xerial</driver-ref>
|
||||
<synchronize>true</synchronize>
|
||||
<jdbc-driver>org.sqlite.JDBC</jdbc-driver>
|
||||
<jdbc-url>jdbc:sqlite:$PROJECT_DIR$/skolehjem/database/laravel.sqlite</jdbc-url>
|
||||
<libraries>
|
||||
<library>
|
||||
<url>file://$APPLICATION_CONFIG_DIR$/jdbc-drivers/Xerial SQLiteJDBC/3.31.1/license.txt</url>
|
||||
</library>
|
||||
<library>
|
||||
<url>file://$APPLICATION_CONFIG_DIR$/jdbc-drivers/Xerial SQLiteJDBC/3.31.1/sqlite-jdbc-3.31.1.jar</url>
|
||||
</library>
|
||||
</libraries>
|
||||
</data-source>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Album extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'name'
|
||||
];
|
||||
|
||||
public function parentAlbum()
|
||||
{
|
||||
return $this->belongsTo('App\Album');
|
||||
}
|
||||
|
||||
public function images()
|
||||
{
|
||||
return $this->hasMany('App\Image');
|
||||
}
|
||||
|
||||
public function videos()
|
||||
{
|
||||
return $this->hasMany('App\Video');
|
||||
}
|
||||
}
|
|
@ -0,0 +1,85 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Album;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class AlbumController 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\Album $album
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function show(Album $album)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @param \App\Album $album
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function edit(Album $album)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \App\Album $album
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(Request $request, Album $album)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param \App\Album $album
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy(Album $album)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
|
@ -8,6 +8,17 @@ use App\Contact;
|
|||
|
||||
class ContactController extends Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware([ "auth" ]);
|
||||
|
||||
$this->middleware([ "check.auth:contact.list" ])->only("index");
|
||||
$this->middleware([ "check.auth:contact.show" ])->only("show");
|
||||
$this->middleware([ "check.auth:contact.create" ])->only("create", "store");
|
||||
$this->middleware([ "check.auth:contact.edit" ])->only("edit", "update");
|
||||
$this->middleware([ "check.auth:contact.delete" ])->only("delete");
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
|
@ -102,9 +113,10 @@ class ContactController extends Controller
|
|||
* @return \Illuminate\Http\RedirectResponse
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function destroy(Contact $id)
|
||||
public function destroy($id)
|
||||
{
|
||||
$id->delete();
|
||||
$contact = Contact::find($id);
|
||||
$contact->delete();
|
||||
return redirect()->route("contacts.index");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,17 @@ use Illuminate\Http\Response;
|
|||
|
||||
class EventController extends Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware([ "auth" ]);
|
||||
|
||||
$this->middleware([ "check.auth:event.list" ])->only("index");
|
||||
$this->middleware([ "check.auth:event.show" ])->only("show");
|
||||
$this->middleware([ "check.auth:event.create" ])->only("create", "store");
|
||||
$this->middleware([ "check.auth:event.edit" ])->only("edit", "update");
|
||||
$this->middleware([ "check.auth:event.delete" ])->only("delete");
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a listing of the resource..
|
||||
*
|
||||
|
@ -70,9 +81,10 @@ class EventController extends Controller
|
|||
* @param int $id
|
||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
*/
|
||||
public function edit(Event $id)
|
||||
public function edit($id)
|
||||
{
|
||||
return Response::detect("events.edit", [ "event" => $id ]);
|
||||
$event = Event::find($id);
|
||||
return Response::detect("events.edit", [ "event" => $event ]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -82,17 +94,15 @@ class EventController extends Controller
|
|||
* @param int $id
|
||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
*/
|
||||
public function update(Request $request, Event $id)
|
||||
public function update(Request $request, $id)
|
||||
{
|
||||
$requestBody = $request->validate([
|
||||
"name" => "unique:events|max:255",
|
||||
"description" => "max:255"
|
||||
]);
|
||||
$data = $request->all();
|
||||
|
||||
$id->update($requestBody);
|
||||
$id->save();
|
||||
$event = Event::find($id);
|
||||
$event->update($data);
|
||||
$event->save();
|
||||
|
||||
return Response::detect("events.update");
|
||||
return Response::detect("events.update", [ "event" => $event]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -104,8 +114,8 @@ class EventController extends Controller
|
|||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
$link = Event::find($id);
|
||||
$link->delete();
|
||||
$event = Event::find($id);
|
||||
$event->delete();
|
||||
return redirect()->route("events.index");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,15 @@ use Illuminate\Http\Response;
|
|||
|
||||
class ExternalLinkController extends Controller
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
$this->middleware("permission:link.external.list")->only("index");
|
||||
$this->middleware("permission:link.external.create")->only(["create", "store"]);
|
||||
$this->middleware("permission:link.external.show")->only("show");
|
||||
$this->middleware("permission:link.external.edit")->only(["edit", "update"]);
|
||||
$this->middleware("permission:link.external.delete")->only("destroy");
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
|
|
|
@ -9,6 +9,17 @@ use Illuminate\Http\Response;
|
|||
|
||||
class FeedbackController extends Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware([ "auth" ]);
|
||||
|
||||
$this->middleware([ "check.auth:feedback.list" ])->only("index");
|
||||
$this->middleware([ "check.auth:feedback.show" ])->only("show");
|
||||
$this->middleware([ "check.auth:feedback.create" ])->only("create", "store");
|
||||
$this->middleware([ "check.auth:feedback.edit" ])->only("edit", "update");
|
||||
$this->middleware([ "check.auth:feedback.delete" ])->only("delete");
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
|
|
|
@ -10,6 +10,17 @@ use Illuminate\Http\Response;
|
|||
|
||||
class MenuPlanController extends Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware([ "auth" ]);
|
||||
|
||||
$this->middleware([ "check.auth:menuplan.list" ])->only("index");
|
||||
$this->middleware([ "check.auth:menuplan.show" ])->only("show");
|
||||
$this->middleware([ "check.auth:menuplan.create" ])->only("create", "store");
|
||||
$this->middleware([ "check.auth:menuplan.edit" ])->only("edit", "update");
|
||||
$this->middleware([ "check.auth:menuplan.delete" ])->only("delete");
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
|
@ -100,7 +111,7 @@ class MenuPlanController extends Controller
|
|||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class PhoneController extends Controller
|
||||
{
|
||||
function index() {
|
||||
return Response::detect("vagttelefons.index");
|
||||
}
|
||||
}
|
|
@ -7,6 +7,17 @@ use Illuminate\Http\Response;
|
|||
|
||||
class ResourceCategoryController extends Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware([ "auth" ]);
|
||||
|
||||
$this->middleware([ "check.auth:resource.category.list" ])->only("index");
|
||||
$this->middleware([ "check.auth:resource.category.show" ])->only("show");
|
||||
$this->middleware([ "check.auth:resource.category.create" ])->only("create", "store");
|
||||
$this->middleware([ "check.auth:resource.category.edit" ])->only("edit", "update");
|
||||
$this->middleware([ "check.auth:resource.category.delete" ])->only("delete");
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
|
|
|
@ -7,6 +7,17 @@ use Illuminate\Http\Response;
|
|||
|
||||
class ResourceController extends Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware([ "auth" ]);
|
||||
|
||||
$this->middleware([ "check.auth:resource.list" ])->only("index");
|
||||
$this->middleware([ "check.auth:resource.show" ])->only("show");
|
||||
$this->middleware([ "check.auth:resource.create" ])->only("create", "store");
|
||||
$this->middleware([ "check.auth:resource.edit" ])->only("edit", "update");
|
||||
$this->middleware([ "check.auth:resource.delete" ])->only("delete");
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
|
@ -14,7 +25,7 @@ class ResourceController extends Controller
|
|||
*/
|
||||
public function index()
|
||||
{
|
||||
//
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2,19 +2,33 @@
|
|||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\ResourceExtension;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class ResourceExtensionController extends Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware([ "auth" ]);
|
||||
|
||||
$this->middleware([ "check.auth:resource.extension.list" ])->only("index");
|
||||
$this->middleware([ "check.auth:resource.extension.show" ])->only("show");
|
||||
$this->middleware([ "check.auth:resource.extension.create" ])->only("create", "store");
|
||||
$this->middleware([ "check.auth:resource.extension.edit" ])->only("edit", "update");
|
||||
$this->middleware([ "check.auth:resource.extension.delete" ])->only("delete");
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index()
|
||||
public function index(Request $request)
|
||||
{
|
||||
//
|
||||
$extensions = ResourceExtension::query()->paginate($request->input("limit", 20));
|
||||
|
||||
return Response::detect("resource-extensions.index", ["extension" => $extensions]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -24,7 +38,7 @@ class ResourceExtensionController extends Controller
|
|||
*/
|
||||
public function create()
|
||||
{
|
||||
//
|
||||
return Response::detect("resource-extensions.create");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -35,7 +49,16 @@ class ResourceExtensionController extends Controller
|
|||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
//
|
||||
$requestBody = $request->validate([
|
||||
"extension" => "unique|required|max:255",
|
||||
"description" => "required|max:255"
|
||||
]);
|
||||
|
||||
$event = new ResourceExtension($requestBody);
|
||||
|
||||
$event->save();
|
||||
|
||||
return Response::detect("events.store");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -44,9 +67,9 @@ class ResourceExtensionController extends Controller
|
|||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function show($id)
|
||||
public function show(ResourceExtension $id)
|
||||
{
|
||||
//
|
||||
return Response::detect("resource-extensions.show", ["extension" => $id]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -57,7 +80,8 @@ class ResourceExtensionController extends Controller
|
|||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
//
|
||||
$extension = ResourceExtension::find($id);
|
||||
return Response::detect("resource-extensions.edit", ["extension" => $extension]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -69,7 +93,14 @@ class ResourceExtensionController extends Controller
|
|||
*/
|
||||
public function update(Request $request, $id)
|
||||
{
|
||||
//
|
||||
$data = $request->all();
|
||||
|
||||
$extension = ResourceExtension::find($id);
|
||||
$extension->update($data);
|
||||
$extension->save();
|
||||
|
||||
return Response::detect("resource-extensions.update", [ "extension" => $extension]);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -80,6 +111,8 @@ class ResourceExtensionController extends Controller
|
|||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
//
|
||||
$extension = ResourceExtension::find($id);
|
||||
$extension->delete();
|
||||
return redirect()->route("resource-extensions.index");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,105 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Spatie\Permission\Models\Role;
|
||||
|
||||
class rolesController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index(Request $request)
|
||||
{
|
||||
$roles = Role::query()->paginate($request->input("limit", 20));
|
||||
|
||||
return Response::detect("roles.index", [ "roles" => $roles]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
return Response::detect("roles.create");
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
$requestRole = $request->validate([
|
||||
"name" => "required|max:255",
|
||||
"description" => "required|max:255"
|
||||
]);
|
||||
|
||||
$role = new Role($requestRole);
|
||||
$role->save();
|
||||
|
||||
return Response::detect("roles.store");
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
return Response::detect("roles.show", [ "role" => $id]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
$role = Role::find($id);
|
||||
return Response::detect("roles.edit", ["role" => $role]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(Request $request, $id)
|
||||
{
|
||||
$data = $request->all();
|
||||
$role = Role::find($id);
|
||||
$role->update($data);
|
||||
$role->save();
|
||||
|
||||
return Response::detect("roles.update", [ "role" => $role ]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
$role = Role::find($id);
|
||||
$role->delete();
|
||||
return redirect()->route("roles.index");
|
||||
}
|
||||
}
|
|
@ -7,6 +7,11 @@ use Illuminate\Http\Response;
|
|||
|
||||
class RootController extends Controller
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
$this->middleware("auth");
|
||||
}
|
||||
|
||||
public function index() {
|
||||
return Response::detect("root.index");
|
||||
}
|
||||
|
|
|
@ -1,185 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Staff;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
|
||||
class StaffController extends Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
// $this->middleware([ "auth" ])->only("logout");
|
||||
// $this->middleware([ "guest" ])->only("login");
|
||||
//
|
||||
// $this->middleware([ "permission:staff.list", "role:admin" ])->only("index");
|
||||
// $this->middleware([ "permission:staff.show", "role:admin" ])->only("show");
|
||||
// $this->middleware([ "permission:staff.edit", "role:admin" ])->only([ "edit", "update" ]);
|
||||
// $this->middleware([ "permission:staff.delete", "role:admin" ])->only("delete");
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @param Request $request
|
||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
*/
|
||||
public function index(Request $request)
|
||||
{
|
||||
$staffs = Staff::query()->paginate($request->query("page", 20));
|
||||
|
||||
return Response::detect("staff.index", [ "staffs" => $staffs ]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
return Response::detect("staff.create");
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
$data = $request->validate([
|
||||
"name_first" => "required|max:255",
|
||||
"name_last" => "required|max:255",
|
||||
"email" => "required|email|unique:staff",
|
||||
"password" => "required|max:60",
|
||||
"phone" => "required|unique:staff"
|
||||
|
||||
]);
|
||||
|
||||
$staff = new Staff($data);
|
||||
$staff->save();
|
||||
|
||||
return Response::detect("staff.store");
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
$staff = Staff::find($id);
|
||||
|
||||
return Response::detect("staff.show", [
|
||||
"staff" => $staff
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
$staff = Staff::find($id);
|
||||
|
||||
return Response::detect("staff.edit", [
|
||||
"staff" => $staff
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param int $id
|
||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
*/
|
||||
public function update(Request $request, $id)
|
||||
{
|
||||
$data = $request->all();
|
||||
|
||||
// $data = $request->validate([
|
||||
// "name_first" => "max:255",
|
||||
// "name_last" => "max:255",
|
||||
// "email" => "email|unique:staff",
|
||||
// "password" => "max:60",
|
||||
// "phone" => "unique:staff",
|
||||
// ]);
|
||||
|
||||
// Validates if the staff is updating itself or another staff.
|
||||
// if($id === Auth::id()) {
|
||||
// $staff = Auth::staff();
|
||||
//
|
||||
// $staff->update($data);
|
||||
//
|
||||
// $staff->save();
|
||||
// return Response::detect("staff.edit", [
|
||||
// "staff" => $staff
|
||||
// ]);
|
||||
// }
|
||||
|
||||
//TODO: Implement when security's ready!!!
|
||||
// else if(Auth::staff()->hasPermissionTo("staff.edit")) {
|
||||
$staff = Staff::find($id);
|
||||
|
||||
/** @var Staff $staff */
|
||||
$staff->update($data);
|
||||
|
||||
$staff->save();
|
||||
// }
|
||||
|
||||
$staffs = Staff::query()->paginate(20);
|
||||
|
||||
return Response::detect("staff.index", [
|
||||
"staffs" => $staffs
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
*/
|
||||
public function destroy(Staff $id)
|
||||
{
|
||||
$id->delete();
|
||||
return redirect()->route("staff.index");
|
||||
}
|
||||
|
||||
/*******************************************/
|
||||
/* Authentication */
|
||||
/*******************************************/
|
||||
|
||||
public function showLogin() {
|
||||
return view("admin.staff.login");
|
||||
}
|
||||
|
||||
public function login(Request $request) {
|
||||
$data = $request->only("email", "password");
|
||||
|
||||
if(Auth::attempt($data)) {
|
||||
//TODO: Implement home?
|
||||
return redirect()->route("staff.index");
|
||||
}
|
||||
|
||||
return redirect()->back(303);
|
||||
}
|
||||
|
||||
public function logout(Request $request) {
|
||||
Auth::logout();
|
||||
|
||||
return redirect()->to("/");
|
||||
}
|
||||
}
|
|
@ -8,19 +8,21 @@ use Illuminate\Http\Response;
|
|||
use App\User;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Spatie\Permission\Models\Role;
|
||||
|
||||
|
||||
class UserController extends Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
// $this->middleware([ "auth" ])->only("logout");
|
||||
// $this->middleware([ "guest" ])->only("login");
|
||||
//
|
||||
// $this->middleware([ "permission:user.list", "role:admin" ])->only("index");
|
||||
// $this->middleware([ "permission:user.show", "role:admin" ])->only("show");
|
||||
// $this->middleware([ "permission:user.edit", "role:admin" ])->only([ "edit", "update" ]);
|
||||
// $this->middleware([ "permission:user.delete", "role:admin" ])->only("delete");
|
||||
$this->middleware([ "auth" ])->only("logout");
|
||||
$this->middleware([ "guest" ])->only("login");
|
||||
|
||||
$this->middleware([ "check.auth:user.list" ])->only("index");
|
||||
$this->middleware([ "check.auth:user.show" ])->only("show");
|
||||
$this->middleware([ "check.auth:user.create" ])->only("create");
|
||||
$this->middleware([ "check.auth:user.edit" ])->only("edit", "update");
|
||||
$this->middleware([ "check.auth:user.delete" ])->only("delete");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -43,7 +45,9 @@ class UserController extends Controller
|
|||
*/
|
||||
public function create()
|
||||
{
|
||||
return Response::detect("users.create");
|
||||
$roles = Role::all();
|
||||
return Response::detect("users.create", ['roles' => $roles]);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -54,7 +58,7 @@ class UserController extends Controller
|
|||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
Log::debug("STORE FUNCTION");
|
||||
// Log::debug("STORE FUNCTION");
|
||||
|
||||
$data = $request->validate([
|
||||
"name_first" => "required|max:255",
|
||||
|
@ -62,18 +66,19 @@ class UserController extends Controller
|
|||
"email" => "required|email|unique:users",
|
||||
"password" => "required|max:60",
|
||||
"phone" => "required|unique:users",
|
||||
"roles" => "max:255"
|
||||
|
||||
]);
|
||||
|
||||
Log::debug("FINISHED VALIDATION?");
|
||||
// Log::debug("FINISHED VALIDATION?");
|
||||
|
||||
$user = new User($data);
|
||||
|
||||
Log::debug("CREATED USER [NOT PERSISTED YET]");
|
||||
// Log::debug("CREATED USER [NOT PERSISTED YET]");
|
||||
|
||||
$user->save();
|
||||
|
||||
Log::debug("SAVED USER");
|
||||
// Log::debug("SAVED USER");
|
||||
|
||||
return Response::detect("users.store");
|
||||
}
|
||||
|
@ -101,10 +106,12 @@ class UserController extends Controller
|
|||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
$roles = Role::all();
|
||||
$user = User::find($id);
|
||||
|
||||
return Response::detect("users.edit", [
|
||||
"user" => $user
|
||||
"user" => $user,
|
||||
"roles" => $roles,
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -182,7 +189,7 @@ class UserController extends Controller
|
|||
/*******************************************/
|
||||
|
||||
public function showLogin() {
|
||||
return view("admin.users.login");
|
||||
return Response::detect("users.login");
|
||||
}
|
||||
|
||||
public function login(Request $request) {
|
||||
|
@ -190,7 +197,7 @@ class UserController extends Controller
|
|||
|
||||
if(Auth::attempt($data)) {
|
||||
//TODO: Implement home?
|
||||
return redirect()->route("users.index");
|
||||
return redirect()->route("root.index");
|
||||
}
|
||||
|
||||
return redirect()->back(303);
|
||||
|
@ -199,6 +206,29 @@ class UserController extends Controller
|
|||
public function logout(Request $request) {
|
||||
Auth::logout();
|
||||
|
||||
return redirect()->to("/");
|
||||
return redirect()->route("users.login");
|
||||
}
|
||||
|
||||
/*******************************************/
|
||||
/* Forgot password */
|
||||
/*******************************************/
|
||||
|
||||
public function showForgot(){
|
||||
return Response::detect('users.forgot');
|
||||
}
|
||||
|
||||
public function forgot(Request $request){
|
||||
$user = User::query()->where('email', '=', $request->email)->first();
|
||||
|
||||
if($user == null){
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
//Send email
|
||||
//TODO: Implement mail.
|
||||
|
||||
return redirect()->route('users.login');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -9,6 +9,17 @@ use App\WashingMachine;
|
|||
|
||||
class WashingMachineController extends Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware([ "auth" ]);
|
||||
|
||||
$this->middleware([ "check.auth:washing.machine.list" ])->only("index");
|
||||
$this->middleware([ "check.auth:washing.machine.show" ])->only("show");
|
||||
$this->middleware([ "check.auth:washing.machine.create" ])->only("create", "store");
|
||||
$this->middleware([ "check.auth:washing.machine.edit" ])->only("edit", "update");
|
||||
$this->middleware([ "check.auth:washing.machine.delete" ])->only("delete");
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
|
|
|
@ -9,6 +9,17 @@ use App\WashingReservation;
|
|||
|
||||
class WashingReservationController extends Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware([ "auth" ]);
|
||||
|
||||
$this->middleware([ "check.auth:washing.machine.reservation.list" ])->only("index");
|
||||
$this->middleware([ "check.auth:washing.machine.reservation.show" ])->only("show");
|
||||
$this->middleware([ "check.auth:washing.machine.reservation.create" ])->only("create", "store");
|
||||
$this->middleware([ "check.auth:washing.machine.reservation.edit" ])->only("edit", "update");
|
||||
$this->middleware([ "check.auth:washing.machine.reservation.delete" ])->only("delete");
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
|
|
|
@ -67,5 +67,7 @@ class Kernel extends HttpKernel
|
|||
'role' => \Spatie\Permission\Middlewares\RoleMiddleware::class,
|
||||
'permission' => \Spatie\Permission\Middlewares\PermissionMiddleware::class,
|
||||
'role_or_permission' => \Spatie\Permission\Middlewares\RoleOrPermissionMiddleware::class,
|
||||
|
||||
"check.auth" => \App\Http\Middleware\CheckAuth::class
|
||||
];
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ class Authenticate extends Middleware
|
|||
protected function redirectTo($request)
|
||||
{
|
||||
if (! $request->expectsJson()) {
|
||||
return route('login');
|
||||
return route('users.login');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use App\User;
|
||||
use Closure;
|
||||
|
||||
class CheckAuth
|
||||
{
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, Closure $next, $permissions)
|
||||
{
|
||||
/** @var User $user */
|
||||
$user = $request->user();
|
||||
|
||||
if(!isset($user))
|
||||
return redirect()->route("users.login");
|
||||
|
||||
if($user->hasAnyPermission($permissions)) {
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
return redirect()->route("users.login");
|
||||
}
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Spatie\Permission\Traits\HasRoles;
|
||||
|
||||
class Staff extends Model
|
||||
{
|
||||
use Notifiable;
|
||||
use HasRoles;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name_first', "name_last", 'email', 'password', "phone"
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be hidden for arrays.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $hidden = [
|
||||
'password', 'remember_token',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast to native types.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $casts = [
|
||||
'email_verified_at' => 'datetime',
|
||||
];
|
||||
|
||||
public function setPasswordAttribute($password) {
|
||||
$this->attributes["password"] = Hash::make($password);
|
||||
}
|
||||
}
|
|
@ -21,7 +21,7 @@ class User extends Authenticatable
|
|||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name_first', "name_last", 'email', 'password', "phone"
|
||||
'name_first', "name_last", 'email', 'password', "phone", "roles"
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
|
@ -13,6 +13,9 @@ class CreateUsersTable extends Migration
|
|||
*/
|
||||
public function up()
|
||||
{
|
||||
if(Schema::hasTable("users"))
|
||||
return;
|
||||
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name_first');
|
||||
|
|
|
@ -20,13 +20,17 @@ class CreatePermissionTables extends Migration
|
|||
throw new \Exception('Error: config/permission.php not loaded. Run [php artisan config:clear] and try again.');
|
||||
}
|
||||
|
||||
Schema::create($tableNames['permissions'], function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('name');
|
||||
$table->string('description');
|
||||
$table->string('guard_name');
|
||||
$table->timestamps();
|
||||
});
|
||||
if(!Schema::hasTable("permissions"))
|
||||
{
|
||||
Schema::create($tableNames['permissions'], function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('name');
|
||||
$table->string('description');
|
||||
$table->string('guard_name');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Schema::create($tableNames['roles'], function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateStaffTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('staff', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name_first');
|
||||
$table->string('name_last');
|
||||
$table->string('email')->unique();
|
||||
$table->timestamp('email_verified_at')->nullable();
|
||||
$table->string('password');
|
||||
$table->integer("phone")->unique();
|
||||
$table->rememberToken();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('staff');
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateAlbumsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('albums', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->foreignId('user_id')->constrained();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('albums');
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateResourceExtensions extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('resource_extensions', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string("extension")->unique();
|
||||
$table->text("description");
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('resource_extensions');
|
||||
}
|
||||
}
|
|
@ -12,5 +12,6 @@ class DatabaseSeeder extends Seeder
|
|||
public function run()
|
||||
{
|
||||
$this->call(PermissionSeeder::class);
|
||||
$this->call(UserSeeder::class);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,19 +40,79 @@ class PermissionSeeder extends Seeder
|
|||
"link.external.edit" => "Allows editing of external links.",
|
||||
"link.external.delete" => "Allows deletion of external links",
|
||||
|
||||
/**
|
||||
* The EVENT specific permissions
|
||||
*/
|
||||
"event.create" => "Create a new event",
|
||||
"event.list" => "Shows all events",
|
||||
"event.show" => "Shows a specific event",
|
||||
"event.edit" => "Allows editing of events",
|
||||
"event.delete" => "Allows deletion of events",
|
||||
|
||||
"contact.create" => "Creates a new contact",
|
||||
"contact.list" => "Shows all contacts",
|
||||
"contact.show" => "Shows a specific contact",
|
||||
"contact.edit" => "allows editing of contacts",
|
||||
"contact.delete" => "Allows deletion of contacts",
|
||||
|
||||
"feedback.create" => "Creates a new feedback message",
|
||||
"feedback.list" => "Shows all feedback messages",
|
||||
"feedback.show" => "Shows a specific feedback message",
|
||||
"feedback.edit" => "allows editing of feedback messages",
|
||||
"feedback.delete" => "allows deletion of feedback messages",
|
||||
|
||||
"menuplan.create" => "Create a new menuplan",
|
||||
"menuplan.list" => "Shows all menuplans",
|
||||
"menuplan.show" => "Shows a specific menuplan",
|
||||
"menuplan.edit" => "Allows editing of menuplans",
|
||||
"menuplan.delete" => "Allows deletion of menuplans",
|
||||
|
||||
"resource.category.create" => "Create a new resource category",
|
||||
"resource.category.list" => "Shows all resource categories",
|
||||
"resource.category.show" => "Shows a specific resource category",
|
||||
"resource.category.edit" => "Allows editing of resource categories",
|
||||
"resource.category.delete" => "Allows deletion of resource categories",
|
||||
|
||||
"resource.extension.create" => "Create a new resource extension",
|
||||
"resource.extension.list" => "Shows all resource extensions",
|
||||
"resource.extension.show" => "Shows a specific resource extension",
|
||||
"resource.extension.edit" => "Allows editing of resource extensions",
|
||||
"resource.extension.delete" => "Allows deletion of resource extensions",
|
||||
|
||||
"resource.create" => "Create a new resource",
|
||||
"resource.list" => "Shows all resources",
|
||||
"resource.show" => "Shows a specific resource",
|
||||
"resource.edit" => "Allows editing of resources",
|
||||
"resource.delete" => "Allows deletion of resources",
|
||||
|
||||
"washing.machine.create" => "Create a new washing machine",
|
||||
"washing.machine.list" => "Shows all washing machines",
|
||||
"washing.machine.show" => "Shows a specific washing machine",
|
||||
"washing.machine.edit" => "Allows editing of washing machines",
|
||||
"washing.machine.delete" => "Allows deletion of washing machines",
|
||||
|
||||
"washing.machine.reservation.create" => "Create a new washing machine reservation",
|
||||
"washing.machine.reservation.list" => "Shows all washing machine reservations",
|
||||
"washing.machine.reservation.show" => "Shows a specific washing machine reservation",
|
||||
"washing.machine.reservation.edit" => "Allows editing of washing machine reservations",
|
||||
"washing.machine.reservation.delete" => "Allows deletion of washing machine reservations",
|
||||
|
||||
|
||||
];
|
||||
|
||||
foreach ($permissions as $key => $value) {
|
||||
if(Permission::findByName($key))
|
||||
continue;
|
||||
|
||||
$permission = new Permission();
|
||||
try {
|
||||
if(Permission::findByName($key))
|
||||
continue;
|
||||
} catch (Exception $e) {
|
||||
$permission = new Permission();
|
||||
|
||||
$permission->name = $key;
|
||||
$permission->description = $value;
|
||||
$permission->name = $key;
|
||||
$permission->description = $value;
|
||||
|
||||
$permission->save();
|
||||
$permission->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
use App\User;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class UserSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
|
||||
// try {
|
||||
//
|
||||
// } catch (Exception $e) {
|
||||
// }
|
||||
|
||||
Log::debug("YEET");
|
||||
|
||||
|
||||
if(User::where("name_first", "admin"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Log::debug("OPRET");
|
||||
$user = new \App\User();
|
||||
|
||||
$user->name_first = "admin";
|
||||
$user->name_last = "admin";
|
||||
$user->email = "admin@admin.local";
|
||||
$user->setPasswordAttribute("1234");
|
||||
$user->phone = 12345678;
|
||||
|
||||
|
||||
|
||||
foreach (\Spatie\Permission\Models\Permission::all() as $permission) {
|
||||
$user->givePermissionTo($permission);
|
||||
}
|
||||
|
||||
$user->save();
|
||||
}
|
||||
}
|
|
@ -77,6 +77,26 @@ input.appinput {
|
|||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.appinput::-moz-placeholder {
|
||||
opacity: 1;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.appinput:-ms-input-placeholder {
|
||||
opacity: 1;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.appinput::-ms-input-placeholder {
|
||||
opacity: 1;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.appinput::placeholder {
|
||||
opacity: 1;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.d-flex {
|
||||
display: flex;
|
||||
}
|
||||
|
|
|
@ -77,6 +77,26 @@ input.appinput {
|
|||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.appinput::-moz-placeholder {
|
||||
opacity: 1;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.appinput:-ms-input-placeholder {
|
||||
opacity: 1;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.appinput::-ms-input-placeholder {
|
||||
opacity: 1;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.appinput::placeholder {
|
||||
opacity: 1;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.d-flex {
|
||||
display: flex;
|
||||
}
|
||||
|
|
|
@ -93,6 +93,7 @@ function generateCalendar(weekOffset = 0) {
|
|||
function onDateSelect(date) {
|
||||
let events;
|
||||
let machinez;
|
||||
let buttonz;
|
||||
|
||||
let container = document.getElementById("event-container");
|
||||
|
||||
|
@ -129,6 +130,23 @@ function onDateSelect(date) {
|
|||
|
||||
events = document.getElementById("events");
|
||||
}
|
||||
if(document.getElementById("create-reservation") != undefined)
|
||||
buttonz = document.getElementById("create-reservation");
|
||||
else {
|
||||
// let span = document.createElement("span");
|
||||
// span.classList.add("events__title");
|
||||
// span.innerText = "Tider";
|
||||
|
||||
let button = document.createElement("button");
|
||||
// button.classList.add("events__title");
|
||||
button.id = "create-reservation";
|
||||
button.innerText = "Reserver";
|
||||
|
||||
// container.appendChild(span);
|
||||
container.appendChild(button);
|
||||
|
||||
buttonz = document.getElementById("events");
|
||||
}
|
||||
|
||||
// events.innerHTML = "";
|
||||
|
||||
|
|
|
@ -55,3 +55,8 @@ input.appinput {
|
|||
line-height: 2rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.appinput::placeholder {
|
||||
opacity: 1;
|
||||
color: white;
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="" class="text-white">Opret Kontakt</a> /
|
||||
<a href="{{ route('contacts.create') }}" class="text-white">Opret Kontakt</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="" class="text-white">Slet Kontakt</a> /
|
||||
<a href="{{ route('contacts.destroy') }}" class="text-white">Slet Kontakt</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="" class="text-white">Vis Kontakter</a> /
|
||||
<a href="{{ route('contacts.index', [ 'contacts' => $contacts ]) }}" class="text-white">Vis Kontakter</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="" class="text-white">Slet Kontakt</a> /
|
||||
<a href="{{ route('contacts.destroy') }}" class="text-white">Slet Kontakt</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="" class="text-white">Opbevar Kontakt</a> /
|
||||
<a href="{{ route('contacts.store') }}" class="text-white">Opbevar Kontakt</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="" class="text-white">Vis Events</a> /
|
||||
<a href="{{route("events.edit", ["event" => $event])}}" class="text-white">Vis Events</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
|
@ -14,10 +14,13 @@
|
|||
<form method="post" action="{{route("events.update", ["event" => $event])}}">
|
||||
@csrf
|
||||
@method("PUT")
|
||||
<label for="title">Titel:</label>
|
||||
<input value="{{$event->name}}" type="text" name="title" id="title" required>
|
||||
<label for="link">Linket:</label>
|
||||
<input value="{{$event->description}}" type="text" name="link" id="link" required>
|
||||
<label for="event_title">Event Titel:</label>
|
||||
<input value="{{$event->name}}" type="text" name="name" id="event_title" required>
|
||||
<label for="description">Beskrivelse</label>
|
||||
<input value="{{$event->description}}" type="text" name="description" id="description" required>
|
||||
<label for="date">Beskrivelse</label>
|
||||
<input value="{{$event->date}}" type="date" name="date" id="date" required>
|
||||
|
||||
<input type="submit" class="btn btn-dark text-white" value="Rediger">
|
||||
</form>
|
||||
@endsection
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
</tr>
|
||||
@foreach($links as $link)
|
||||
<tr>
|
||||
<th>{{$link->name}}</th>
|
||||
<th><a href="{{$link->link}}">{{$link->link}}</th>
|
||||
<td>{{$link->name}}</td>
|
||||
<td><a href="{{$link->link}}">{{$link->link}}</td>
|
||||
<td><a href="{{ route("external-links.edit", [ "external_link" => $link ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
<td><form method="post" action="{{ route("external-links.destroy", [ "external_link" => $link ]) }}" class="w-100 nostyle">
|
||||
@csrf
|
||||
|
|
|
@ -19,6 +19,15 @@
|
|||
<a href="{{ route('users.create') }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Bruger</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="segment">
|
||||
<h3 class="text-white">Roller</h3>
|
||||
<div class="row">
|
||||
<a href="{{ route("roles.index") }}" class="text-white"><img src="{{ asset('/images/icons/eye.svg') }}" alt="Read">Vis Roller</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<a href="{{ route('roles.create') }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Rolle</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="segment">
|
||||
<h3 class="text-white">Menuplan</h3>
|
||||
<div class="row">
|
||||
|
@ -49,22 +58,31 @@
|
|||
<a href="{{ route('washing-machines.create') }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Vaskemaskine</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="segment">
|
||||
<h3 class="text-white">Eksterne Links</h3>
|
||||
<div class="row">
|
||||
<a href="{{ route("external-links.index") }}" class="text-white"><img src="{{ asset('/images/icons/eye.svg') }}" alt="Read">Vis Links</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<a href="{{ route('external-links.create') }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Link</a>
|
||||
</div>
|
||||
</div>
|
||||
{{-- <div class="segment">--}}
|
||||
{{-- <h3 class="text-white">Personale</h3>--}}
|
||||
{{-- <div class="row">--}}
|
||||
{{-- <a href="{{ route('staff.index') }}" class="text-white"><img src="{{ asset('/images/icons/eye.svg') }}" alt="Read">Vis Personale</a>--}}
|
||||
{{-- </div>--}}
|
||||
{{-- <div class="row">--}}
|
||||
{{-- <a href="{{ route('staff.create') }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Personal</a>--}}
|
||||
{{-- </div>--}}
|
||||
{{-- </div>--}}
|
||||
<div class="segment">
|
||||
<h3 class="text-white">Kontakter</h3>
|
||||
<div class="row">
|
||||
<a href="{{ route("contacts.index") }}" class="text-white"><img src="{{ asset('/images/icons/eye.svg') }}" alt="Read">Vis Kontakter</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<a href="{{ route("contacts.create") }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Kontakt</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="segment">
|
||||
<h3 class="text-white">Personale</h3>
|
||||
<div class="row">
|
||||
<a href="{{ route('staff.index') }}" class="text-white"><img src="{{ asset('/images/icons/eye.svg') }}" alt="Read">Vis Personale</a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<a href="{{ route('staff.create') }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Personal</a>
|
||||
<a href="{{ route('contacts.create') }}" class="text-white"><img src="{{ asset('/images/icons/plus.svg') }}" alt="Create">Opret Kontakt</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="segment">
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
@extends("admin.layout.base")
|
||||
@extends("admin.layout.header")
|
||||
|
||||
@section("title")
|
||||
Rolle - Opret
|
||||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="{{ route('roles.create') }}" class="text-white">Opret Rolle</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
<h1>Opret Rolle:</h1>
|
||||
<form method="post" action="{{ route("roles.store") }}">
|
||||
@csrf
|
||||
<label for="name">Navn:</label>
|
||||
<input type="text" name="name" id="name" placeholder="Admin" required>
|
||||
<label for="name">Beskrivelse:</label>
|
||||
<input type="text" name="description" id="description" placeholder="Admin rollen bruges til administratorene" required>
|
||||
<input type="submit" class="btn btn-dark text-white" value="Opret">
|
||||
</form>
|
||||
@endsection
|
|
@ -0,0 +1,13 @@
|
|||
@extends("admin.layout.base")
|
||||
@extends("admin.layout.header")
|
||||
|
||||
@section("title")
|
||||
Rolle - Fjern
|
||||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="{{ route('roles.delete') }}" class="text-white">Fjern Rolle</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
@endsection
|
|
@ -0,0 +1,23 @@
|
|||
@extends("admin.layout.base")
|
||||
@extends("admin.layout.header")
|
||||
|
||||
@section("title")
|
||||
Rolle - Rediger
|
||||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="{{ route('roles.edit', ['role' => $role]) }}" class="text-white">Rediger Rolle</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
<h1>Rediger Rolle:</h1>
|
||||
<form method="post" action="{{ route("roles.update", ['role' => $role]) }}">
|
||||
@csrf
|
||||
@method("put")
|
||||
<label for="name">Navn:</label>
|
||||
<input type="text" name="name" id="name" placeholder="Admin" value="{{ $role->name }}" required>
|
||||
<label for="name">Beskrivelse:</label>
|
||||
<input type="text" name="description" id="description" placeholder="Admin rollen bruges til administratorene" value="{{ $role->description }}" required>
|
||||
<input type="submit" class="btn btn-dark text-white" value="Rediger">
|
||||
</form>
|
||||
@endsection
|
|
@ -0,0 +1,35 @@
|
|||
@extends("admin.layout.base")
|
||||
@extends("admin.layout.header")
|
||||
|
||||
@section("title")
|
||||
Rolle - Vis
|
||||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="{{ route('roles.index') }}" class="text-white">Vis Roller</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
<table class="tbl">
|
||||
<tr>
|
||||
<th>Navn</th>
|
||||
<th>Beskrivelse</th>
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/pencil.svg') }}" alt="Update"></th>
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
||||
</tr>
|
||||
@foreach($roles as $role)
|
||||
<tr>
|
||||
<td>{{ $role->name }}</td>
|
||||
<td>{{ $role->description }}</td>
|
||||
<td><a href="{{ route("roles.edit", [ "role" => $role->id ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
<td><form method="post" action="{{ route("roles.destroy", [ "role" => $role ]) }}" class="w-100 nostyle">
|
||||
@csrf
|
||||
@method("delete")
|
||||
|
||||
<button class="w-100 nostyle" type="submit"><img class="w-100 cursor-pointer" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
@endsection
|
|
@ -0,0 +1,14 @@
|
|||
@extends("admin.layout.base")
|
||||
@extends("admin.layout.header")
|
||||
|
||||
@section("title")
|
||||
Rolle - Vis
|
||||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="{{ route('rolle.index') }}" class="text-white">Vis Brugere</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
show.blade.php
|
||||
@endsection
|
|
@ -0,0 +1,14 @@
|
|||
@extends("admin.layout.base")
|
||||
@extends("admin.layout.header")
|
||||
|
||||
@section("title")
|
||||
Rolle - Opret
|
||||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="{{ route('roles.create') }}" class="text-white">Opret Roller</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
Rollen blev (ikke) oprettet.
|
||||
@endsection
|
|
@ -0,0 +1,14 @@
|
|||
@extends("admin.layout.base")
|
||||
@extends("admin.layout.header")
|
||||
|
||||
@section("title")
|
||||
Rolle - Rediger
|
||||
@endsection
|
||||
|
||||
@section("path")
|
||||
<a href="{{ route('roles.edit', ['role' => $role]) }}" class="text-white">Rediger Rolle</a> /
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
Din rolle blev (ikke) redigeret.
|
||||
@endsection
|
|
@ -27,9 +27,10 @@
|
|||
<input type="tel" name="phone" id="tel" placeholder="12345678" pattern="[0-9]{2}[0-9]{2}[0-9]{2}[0-9]{2}" required>
|
||||
<label for="role">Rolle:</label>
|
||||
<select name="role" id="role" class="mb-2" required>
|
||||
<option value="admin">Admin</option>
|
||||
<option value="staff">Personale</option>
|
||||
<option value="resident">Beboer</option>
|
||||
<option disabled selected value> -- Vælg en Rolle -- </option>
|
||||
@foreach($roles as $role)
|
||||
<option value="{{ $role->name }}">{{ $role->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<input type="submit" class="btn btn-dark text-white" value="Opret">
|
||||
</form>
|
||||
|
|
|
@ -28,9 +28,10 @@
|
|||
<input type="tel" name="phone" id="tel" value="{{ $user->phone }}" required>
|
||||
<label for="role">Rolle:</label>
|
||||
<select name="role" id="role" class="mb-2" required>
|
||||
<option value="admin">Admin</option>
|
||||
<option value="staff">Personale</option>
|
||||
<option value="resident">Beboer</option>
|
||||
<option disabled selected value> -- Vælg en Rolle -- </option>
|
||||
@foreach($roles as $role)
|
||||
<option value="{{ $role->name }}">{{ $role->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<input type="submit" class="btn btn-dark text-white" value="Rediger">
|
||||
</form>
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
@extends("user.layout.base")
|
||||
|
||||
@section("title")
|
||||
Login
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
<main style="background-color: #00788a; height: 100%;">
|
||||
<div class="brand">
|
||||
<img src="{{URL::asset('/images/logos/Logo-hvid.svg')}}" alt="Syddansk Erhvervsskole">
|
||||
</div>
|
||||
<form action="" method="post">
|
||||
@csrf
|
||||
<input class="appinput" type="email" name="email" placeholder="Email" required>
|
||||
<input class="btn btn-dark" type="submit" value="Send reset mail">
|
||||
</form>
|
||||
</main>
|
||||
@endsection
|
|
@ -1,4 +1,4 @@
|
|||
@extends("app.layout.base")
|
||||
@extends("user.layout.base")
|
||||
|
||||
@section("title")
|
||||
Login
|
||||
|
@ -9,7 +9,7 @@
|
|||
<div class="brand">
|
||||
<img src="{{URL::asset('/images/logos/Logo-hvid.svg')}}" alt="Syddansk Erhvervsskole">
|
||||
</div>
|
||||
<form action="" method="post">
|
||||
<form action="{{ route("users.login") }}" method="post">
|
||||
@csrf
|
||||
<input class="appinput" type="email" name="email" placeholder="Email" required>
|
||||
<input class="appinput" type="password" name="password" placeholder="Password" required>
|
||||
|
@ -20,8 +20,7 @@
|
|||
</span>
|
||||
</label>
|
||||
<input class="btn btn-dark" type="submit" value="Sign in">
|
||||
<button class="btn" onclick="window.location = '';">Sign up</button>
|
||||
</form>
|
||||
<a class="text-white text-center" href="">Forgot password?</a>
|
||||
<a class="text-white text-center" href="{{ route('users.show-forgot') }}">Forgot password?</a>
|
||||
</main>
|
||||
@endsection
|
||||
|
|
|
@ -16,6 +16,10 @@
|
|||
</button>
|
||||
</header>
|
||||
<div class="d-none bg-sde-blue col" id="menu">
|
||||
<a href="{{ route("root.index") }}">
|
||||
Home
|
||||
</a>
|
||||
|
||||
<a href="{{ route("menu-plans.index") }}">
|
||||
<img src="{{URL::asset('/images/icons/Menuplan.svg')}}" alt="Menuplan">
|
||||
Menuplan
|
||||
|
@ -28,15 +32,16 @@
|
|||
<img src="{{URL::asset('/images/icons/Vaske booking liste.svg')}}" alt="Reservationer">
|
||||
Reservationer
|
||||
</a>
|
||||
{{-- MÅ IKKE SLETTES!!!! --}}
|
||||
{{-- <a href="#">--}}
|
||||
{{-- <img src="{{URL::asset('/images/icons/Galleri.svg')}}" alt="Galleri">--}}
|
||||
{{-- Galleri--}}
|
||||
{{-- </a>--}}
|
||||
<a href="#">
|
||||
<img src="{{URL::asset('/images/icons/Galleri.svg')}}" alt="Galleri">
|
||||
Galleri
|
||||
</a>
|
||||
<a href="{{ route("contacts.index") }}">
|
||||
<img src="{{URL::asset('/images/icons/Kontoret.svg')}}" alt="Kontoret">
|
||||
Kontoret
|
||||
</a>
|
||||
<a href="#">
|
||||
<a href="{{ route("phones.index") }}">
|
||||
<img src="{{URL::asset('/images/icons/Vagttelefon-hvid.svg')}}" alt="Vagttelefon">
|
||||
Vagttelefon
|
||||
</a>
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
@extends("user.layout.base")
|
||||
|
||||
@section("title")
|
||||
Login
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
<main style="background-color: #00788a; height: 100%;">
|
||||
<div class="brand">
|
||||
<img src="{{URL::asset('/images/logos/Logo-hvid.svg')}}" alt="Syddansk Erhvervsskole">
|
||||
</div>
|
||||
<form action="" method="post">
|
||||
@csrf
|
||||
<input class="appinput" type="email" name="email" placeholder="Email" required>
|
||||
<input class="btn btn-dark" type="submit" value="Send reset mail">
|
||||
</form>
|
||||
</main>
|
||||
@endsection
|
|
@ -1,4 +1,4 @@
|
|||
@extends("app.layout.base")
|
||||
@extends("user.layout.base")
|
||||
|
||||
@section("title")
|
||||
Login
|
||||
|
@ -9,7 +9,8 @@
|
|||
<div class="brand">
|
||||
<img src="{{URL::asset('/images/logos/Logo-hvid.svg')}}" alt="Syddansk Erhvervsskole">
|
||||
</div>
|
||||
<form action="" method="post">
|
||||
<form action="{{ route("users.login") }}" method="post">
|
||||
@csrf
|
||||
<input class="appinput" type="email" name="email" placeholder="Email" required>
|
||||
<input class="appinput" type="password" name="password" placeholder="Password" required>
|
||||
<label class="toggle">
|
||||
|
@ -19,8 +20,7 @@
|
|||
</span>
|
||||
</label>
|
||||
<input class="btn btn-dark" type="submit" value="Sign in">
|
||||
<button class="btn" onclick="window.location = '';">Sign up</button>
|
||||
</form>
|
||||
<a class="text-white text-center" href="">Forgot password?</a>
|
||||
<a class="text-white text-center" href="{{ route('users.show-forgot') }}">Forgot password?</a>
|
||||
</main>
|
||||
@endsection
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
@extends('layout.base')
|
||||
|
||||
@section("title")
|
||||
Opret Bruger
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div>
|
||||
<form action="{{ route("users.store") }}" method="post">
|
||||
@csrf
|
||||
|
||||
<label for="name_first">First Name</label>
|
||||
<input id="name_first" type="text" name="name_first">
|
||||
|
||||
<label for="name_last">Last Name</label>
|
||||
<input id="name_last" type="text" name="name_last">
|
||||
|
||||
<label for="email">Email</label>
|
||||
<input id="email" type="email" name="email">
|
||||
|
||||
<label for="password">Password</label>
|
||||
<input id="password" type="password" name="password">
|
||||
|
||||
<input type="submit" value="Opret">
|
||||
</form>
|
||||
</div>
|
||||
@endsection
|
|
@ -0,0 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>@yield("title")</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link type="text/css" rel="stylesheet" href="{{ mix("/css/webapp.css") }}">
|
||||
</head>
|
||||
<body style="background-color: #00788a;">
|
||||
@yield("content")
|
||||
|
||||
<script src="{{ mix("/js/app.js") }}"></script>
|
||||
@yield("scripts")
|
||||
</body>
|
||||
</html>
|
|
@ -1,100 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<title>Laravel</title>
|
||||
|
||||
<!-- Fonts -->
|
||||
<link href="https://fonts.googleapis.com/css?family=Nunito:200,600" rel="stylesheet">
|
||||
|
||||
<!-- Styles -->
|
||||
<style>
|
||||
html, body {
|
||||
background-color: #fff;
|
||||
color: #636b6f;
|
||||
font-family: 'Nunito', sans-serif;
|
||||
font-weight: 200;
|
||||
height: 100vh;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.full-height {
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.flex-center {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.position-ref {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.top-right {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 18px;
|
||||
}
|
||||
|
||||
.content {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 84px;
|
||||
}
|
||||
|
||||
.links > a {
|
||||
color: #636b6f;
|
||||
padding: 0 25px;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
letter-spacing: .1rem;
|
||||
text-decoration: none;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.m-b-md {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="flex-center position-ref full-height">
|
||||
@if (Route::has('login'))
|
||||
<div class="top-right links">
|
||||
@auth
|
||||
<a href="{{ url('/home') }}">Home</a>
|
||||
@else
|
||||
<a href="{{ route('login') }}">Login</a>
|
||||
|
||||
@if (Route::has('register'))
|
||||
<a href="{{ route('register') }}">Register</a>
|
||||
@endif
|
||||
@endauth
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="content">
|
||||
<div class="title m-b-md">
|
||||
Laravel
|
||||
</div>
|
||||
|
||||
<div class="links">
|
||||
<a href="https://laravel.com/docs">Docs</a>
|
||||
<a href="https://laracasts.com">Laracasts</a>
|
||||
<a href="https://laravel-news.com">News</a>
|
||||
<a href="https://blog.laravel.com">Blog</a>
|
||||
<a href="https://nova.laravel.com">Nova</a>
|
||||
<a href="https://forge.laravel.com">Forge</a>
|
||||
<a href="https://vapor.laravel.com">Vapor</a>
|
||||
<a href="https://github.com/laravel/laravel">GitHub</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -18,20 +18,25 @@ use Illuminate\Support\Facades\Route;
|
|||
//});
|
||||
|
||||
Route::get("/", "RootController@index")->name("root.index");
|
||||
|
||||
Route::get("/home", "RootController@index")->name("root.index");
|
||||
|
||||
Route::get("/login", "UserController@showLogin")->name("users.show-login");
|
||||
Route::post("/login", "UserController@login")->name("users.login");
|
||||
Route::get("/logout", "UserController@logout")->name("users.logout");
|
||||
Route::get("/forgot", "UserController@showForgot")->name("users.show-forgot");
|
||||
Route::post("/forgot", "UserController@forgot")->name("users.forgot");
|
||||
|
||||
Route::get("phones", "PhoneController@index")->name("phones.index");
|
||||
|
||||
|
||||
Route::resource("contacts", "ContactController");
|
||||
Route::resource("menu-plans", "MenuPlanController");
|
||||
Route::resource("users", "UserController");
|
||||
Route::resource("staff", "StaffController");
|
||||
//Route::resource("staff", "StaffController");
|
||||
Route::resource("events", "EventController");
|
||||
Route::resource("washing-machines", "WashingMachineController");
|
||||
Route::resource("washing-reservations", "WashingReservationController");
|
||||
Route::resource("feedbacks", "FeedbackController");
|
||||
Route::resource("external-links", "ExternalLinkController");
|
||||
Route::resource("resource-extensions", "ResourceExtensionController");
|
||||
Route::resource("roles", "RolesController");
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue