Fixed blade references.
This commit is contained in:
parent
e056567f57
commit
9c3796220f
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\ExternalLink;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
class ExternalLinkController extends Controller
|
class ExternalLinkController extends Controller
|
||||||
|
@ -9,11 +10,14 @@ class ExternalLinkController extends Controller
|
||||||
/**
|
/**
|
||||||
* Display a listing of the resource.
|
* Display a listing of the resource.
|
||||||
*
|
*
|
||||||
* @return \Illuminate\Http\Response
|
* @param Request $request
|
||||||
|
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||||
*/
|
*/
|
||||||
public function index()
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
//
|
$externalLink = ExternalLink::query()->paginate($request->input("limit", 20));
|
||||||
|
|
||||||
|
return view("external-link.index", [ "externalLink" => $externalLink ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -169,7 +169,7 @@ class UserController extends Controller
|
||||||
|
|
||||||
if(Auth::attempt($data)) {
|
if(Auth::attempt($data)) {
|
||||||
//TODO: Implement home?
|
//TODO: Implement home?
|
||||||
return view("admin.users.home", [ "user" => Auth::user() ]);
|
return view("admin.users.index", [ "user" => Auth::user() ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return redirect()->back(303);
|
return redirect()->back(303);
|
||||||
|
|
|
@ -18,7 +18,7 @@ class WashingMachineController extends Controller
|
||||||
{
|
{
|
||||||
$machines = WashingMachine::query()->paginate($request->query("page", 1));
|
$machines = WashingMachine::query()->paginate($request->query("page", 1));
|
||||||
|
|
||||||
return view("washing-machine.index", [ "machines" => $machines ]);
|
return view("admin.washing-machines.index", [ "machines" => $machines ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -28,7 +28,7 @@ class WashingMachineController extends Controller
|
||||||
*/
|
*/
|
||||||
public function create()
|
public function create()
|
||||||
{
|
{
|
||||||
return view("washing-machine.create");
|
return view("admin.washing-machines.create");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -46,7 +46,7 @@ class WashingMachineController extends Controller
|
||||||
$machine = new WashingMachine($data);
|
$machine = new WashingMachine($data);
|
||||||
$machine->save();
|
$machine->save();
|
||||||
|
|
||||||
return view("washing-machine.store");
|
return view("admin.washing-machines.store");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -59,7 +59,7 @@ class WashingMachineController extends Controller
|
||||||
{
|
{
|
||||||
$machine = WashingMachine::find($id);
|
$machine = WashingMachine::find($id);
|
||||||
|
|
||||||
return view("washing-machine.show", [
|
return view("admin.washing-machines.show", [
|
||||||
"machine" => $machine
|
"machine" => $machine
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@ class WashingMachineController extends Controller
|
||||||
{
|
{
|
||||||
$machine = WashingMachine::find($id);
|
$machine = WashingMachine::find($id);
|
||||||
|
|
||||||
return view("washing-machine.edit", [
|
return view("admin.washing-machines.edit", [
|
||||||
"machine" => $machine
|
"machine" => $machine
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@ -98,7 +98,7 @@ class WashingMachineController extends Controller
|
||||||
|
|
||||||
$machine->save();
|
$machine->save();
|
||||||
|
|
||||||
return view("washing-machine.edit", [
|
return view("admin.washing-machines.edit", [
|
||||||
"machine" => $machine
|
"machine" => $machine
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@ -114,6 +114,6 @@ class WashingMachineController extends Controller
|
||||||
$machine = WashingMachine::find($id);
|
$machine = WashingMachine::find($id);
|
||||||
$machine->delete();
|
$machine->delete();
|
||||||
|
|
||||||
return view("washing-machine.destroy");
|
return view("admin.washing-machines.destroy");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,8 @@ use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||||
use Illuminate\Notifications\Notifiable;
|
use Illuminate\Notifications\Notifiable;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
use Illuminate\Support\Facades\Hash;
|
||||||
use Spatie\Permission\Traits\HasRoles;
|
use Spatie\Permission\Traits\HasRoles;
|
||||||
|
|
||||||
class User extends Authenticatable
|
class User extends Authenticatable
|
||||||
|
@ -39,4 +41,8 @@ class User extends Authenticatable
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
'email_verified_at' => 'datetime',
|
'email_verified_at' => 'datetime',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
public function setPasswordAttribute($password) {
|
||||||
|
$this->attributes["password"] = Hash::make($password);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
|
|
||||||
@auth
|
@auth
|
||||||
<a href="" class="btn btn-dark text-white m-0 ml-auto">User: {{ Auth::user()->name }}</a>
|
<a href="" class="btn btn-dark text-white m-0 ml-auto">User: {{ Auth::user()->name }}</a>
|
||||||
<a href="{{ route('user.logout') }}" class="btn btn-dark text-white m-0 ml-1 mr-1">Log ud</a>
|
<a href="{{ route('users.logout') }}" class="btn btn-dark text-white m-0 ml-1 mr-1">Log ud</a>
|
||||||
@else
|
@else
|
||||||
<a href="{{ route('user.login') }}" class="btn btn-dark text-white m-0 ml-auto mr-1">Log ind</a>
|
<a href="{{ route('users.login') }}" class="btn btn-dark text-white m-0 ml-auto mr-1">Log ind</a>
|
||||||
@endauth
|
@endauth
|
||||||
|
|
||||||
</header>
|
</header>
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
@section("content")
|
@section("content")
|
||||||
<h1>Opret Bruger:</h1>
|
<h1>Opret Bruger:</h1>
|
||||||
<form method="post" action="/users">
|
<form method="post" action="/users">
|
||||||
|
@csrf
|
||||||
<label for="name_first">Fornavn:</label>
|
<label for="name_first">Fornavn:</label>
|
||||||
<input type="text" name="name_first" id="name_first" required>
|
<input type="text" name="name_first" id="name_first" required>
|
||||||
<label for="name_last">Efternavn:</label>
|
<label for="name_last">Efternavn:</label>
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
@section("content")
|
@section("content")
|
||||||
<h1>Rediger Bruger:</h1>
|
<h1>Rediger Bruger:</h1>
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
|
@csrf
|
||||||
<label for="name_first">Fornavn:</label>
|
<label for="name_first">Fornavn:</label>
|
||||||
<input type="text" name="name_first" id="name_first" value="{Fornavn}" required>
|
<input type="text" name="name_first" id="name_first" value="{Fornavn}" required>
|
||||||
<label for="name_last">Efternavn:</label>
|
<label for="name_last">Efternavn:</label>
|
||||||
|
|
|
@ -21,13 +21,15 @@
|
||||||
<th style="width: 1px;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
<th style="width: 1px;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{ID}</td>
|
@foreach($users as $user)
|
||||||
<td>{Fornavn}</td>
|
<td>{{ $user->id }}</td>
|
||||||
<td>{Efternavn}</td>
|
<td>{{ $user->name_first }}</td>
|
||||||
<td>{Email}</td>
|
<td>{{ $user->name_last }}</td>
|
||||||
<td>{TLF}</td>
|
<td>{{ $user->email }}</td>
|
||||||
<td><a href=""><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
<td>{{ $user->phone }}</td>
|
||||||
<td><a href=""><img class="w-100" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></a></td>
|
<td><a href=""><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||||
|
<td><a href=""><img class="w-100" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></a></td>
|
||||||
|
@endforeach
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
<img src="{{URL::asset('/images/logos/Logo-hvid.svg')}}" alt="Syddansk Erhvervsskole">
|
<img src="{{URL::asset('/images/logos/Logo-hvid.svg')}}" alt="Syddansk Erhvervsskole">
|
||||||
</div>
|
</div>
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
|
@csrf
|
||||||
<input class="appinput" type="email" name="email" placeholder="Email" required>
|
<input class="appinput" type="email" name="email" placeholder="Email" required>
|
||||||
<input class="appinput" type="password" name="password" placeholder="Password" required>
|
<input class="appinput" type="password" name="password" placeholder="Password" required>
|
||||||
<label class="toggle">
|
<label class="toggle">
|
||||||
|
|
Loading…
Reference in New Issue