Skip to content

Commit f3d7ad2

Browse files
committed
✨ Feat: add new layouting provider, and layout for dashboard
1 parent 9ba8e8a commit f3d7ad2

21 files changed

Lines changed: 276 additions & 34 deletions

File tree

app/Http/Controllers/Auth/PageController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ class PageController extends Controller
1414
{
1515
public function __invoke(): View
1616
{
17-
return view('auth');
17+
return view('pages.auth');
1818
}
1919
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
namespace App\Http\Controllers\Dashboard\Events;
4+
5+
use App\Http\Controllers\Controller;
6+
use Illuminate\Http\Request;
7+
8+
class PageController extends Controller
9+
{
10+
/**
11+
* Handle the incoming request.
12+
*/
13+
public function __invoke(Request $request)
14+
{
15+
//
16+
}
17+
}

app/Livewire/Auth/LoginForm.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ public function form(Schema $schema): Schema
3939
TextInput::make('email')
4040
->label('Email')
4141
->required()
42-
->email(),
42+
->email()
43+
->autofocus(),
4344
TextInput::make('password')
4445
->label('Password')
4546
->required()

app/Providers/AppServiceProvider.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace App\Providers;
44

5+
use Illuminate\Support\Facades\Blade;
56
use Illuminate\Support\ServiceProvider;
67

78
class AppServiceProvider extends ServiceProvider
@@ -19,6 +20,6 @@ public function register(): void
1920
*/
2021
public function boot(): void
2122
{
22-
//
23+
Blade::anonymousComponentPath(resource_path() . '/views/layouts', 'layout');
2324
}
2425
}

database/seeders/DatabaseSeeder.php

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,19 @@ public function run(): void
2020
// User::factory(100)->create();
2121

2222
// testing user
23-
User::create([
24-
'name' => 'user 1',
25-
'email' => 'user@gmail.com',
26-
'password' => 'password',
23+
// User::create([
24+
// 'name' => 'user 1',
25+
// 'email' => 'user@gmail.com',
26+
// 'password' => 'password',
27+
// ]);
28+
29+
// testing admin
30+
$admin = User::create([
31+
'name' => 'admin',
32+
'email' => 'admin@gmail.com',
33+
'password' => 'admin password'
2734
]);
35+
36+
$admin->assignRole('admin');
2837
}
2938
}

database/seeders/RoleSeeder.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,16 @@ public function run(): void
4141
'events.view',
4242
'events.edit',
4343
'events.delete',
44+
'events.join',
4445

4546
// attendances management
4647
'attendances.list',
4748
'attendances.create',
4849
'attendances.view',
4950
'attendances.edit',
5051
'attendances.delete',
52+
'attendances.export',
53+
'attendances.import'
5154

5255
// recruitments management
5356
// 'recruitments.list',
Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1-
<div class="absolute top-4 right-4" x-data>
2-
<button
1+
<div class="absolute top-4 right-4">
2+
<x-utilities.theme-toggler />
3+
4+
{{--
5+
<button
36
class="btn btn-ghost text-base-content aspect-square p-0"
47
x-on:click="$store.themeController.toggle()"
58
x-show="$store.themeController.active === 'light'"
6-
>
9+
>
710
@svg('heroicon-o-sun', 'h-6')
8-
</button>
9-
10-
<button
11+
</button>
12+
13+
<button
1114
class="btn btn-ghost text-base-content aspect-square p-0"
1215
x-on:click="$store.themeController.toggle()"
1316
x-show="$store.themeController.active === 'dark'"
14-
>
17+
>
1518
@svg('heroicon-o-moon', 'h-6')
16-
</button>
19+
</button>
20+
--}}
1721
</div>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<li>
2+
{{ $slot }}
3+
</li>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@props(['href' => '/'])
2+
3+
<li>
4+
<a href="{{ $href }}">
5+
{{ $slot }}
6+
</a>
7+
</li>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<div class="breadcrumbs text-base-content">
2+
<ul>
3+
{{ $slot }}
4+
</ul>
5+
</div>

0 commit comments

Comments
 (0)