Register dan login
This commit is contained in:
parent
81179cac89
commit
e359226aa2
|
@ -25,7 +25,7 @@ class LoginController extends Controller
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $redirectTo = '/home';
|
protected $redirectTo = '/';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new controller instance.
|
* Create a new controller instance.
|
||||||
|
|
|
@ -28,7 +28,7 @@ class RegisterController extends Controller
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $redirectTo = '/home';
|
protected $redirectTo = '/';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new controller instance.
|
* Create a new controller instance.
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
<?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\Contracts\Support\Renderable
|
|
||||||
*/
|
|
||||||
public function index()
|
|
||||||
{
|
|
||||||
return view('home');
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -7,6 +7,11 @@
|
||||||
|
|
||||||
class HomeController extends Controller
|
class HomeController extends Controller
|
||||||
{
|
{
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->middleware('auth');
|
||||||
|
}
|
||||||
|
|
||||||
public function index() {
|
public function index() {
|
||||||
return view('pages.home');
|
return view('pages.home');
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
@extends('layouts.app')
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
<div class="container">
|
|
||||||
<div class="row justify-content-center">
|
|
||||||
<div class="col-md-8">
|
|
||||||
<div class="card">
|
|
||||||
<div class="card-header">{{ __('Dashboard') }}</div>
|
|
||||||
|
|
||||||
<div class="card-body">
|
|
||||||
@if (session('status'))
|
|
||||||
<div class="alert alert-success" role="alert">
|
|
||||||
{{ session('status') }}
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
{{ __('You are logged in!') }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@endsection
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
<body class="font-poppins">
|
<body class="font-poppins">
|
||||||
<header class="fixed top-0 w-full bg-white shadow-sm z-50" x-data="{ showModal: false, modalType: '' }">
|
<header class="fixed top-0 w-full bg-white shadow-sm z-50" x-data="{ showModal: false, modalType: '' }">
|
||||||
<nav class="relative py-4 px-4 lg:px-44 flex items-center justify-between">
|
<nav x-data="{ isMobileMenuOpen: false }" class="relative py-4 px-4 lg:px-44 flex items-center justify-between">
|
||||||
<a href="https://ayo.co.id">
|
<a href="https://ayo.co.id">
|
||||||
<img src="{{ asset('images/ayo.png') }}" alt="Ayo Logo" class="w-24">
|
<img src="{{ asset('images/ayo.png') }}" alt="Ayo Logo" class="w-24">
|
||||||
</a>
|
</a>
|
||||||
|
@ -30,20 +30,38 @@
|
||||||
<a href="#"><i class="fa fa-shopping-cart text-xl text-gray-700"></i></a>
|
<a href="#"><i class="fa fa-shopping-cart text-xl text-gray-700"></i></a>
|
||||||
|
|
||||||
<!-- Mobile hamburger -->
|
<!-- Mobile hamburger -->
|
||||||
<button class="block lg:hidden border border-l-gray-300 border-t-0 border-r-0 border-b-0 pl-4">
|
<button @click="isMobileMenuOpen = !isMobileMenuOpen"
|
||||||
<i class="fas fa-bars text-gray-700"></i>
|
class="block lg:hidden border-l pl-4 border-gray-300 focus:outline-none">
|
||||||
|
<i class="fas fa-bars text-2xl text-gray-700"></i>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<!-- Desktop buttons -->
|
<!-- Desktop buttons -->
|
||||||
<div class="hidden lg:flex items-center space-x-4">
|
<div class="hidden lg:flex items-center space-x-4">
|
||||||
<button @click="showModal = true; modalType = 'login'"
|
<button @click="showModal = true; modalType = 'login'"
|
||||||
class="text-sm font-medium text-gray-700 hover:text-primary">Masuk</button>
|
class="text-sm font-medium text-gray-700 hover:text-primary transition">Masuk</button>
|
||||||
<button @click="showModal = true; modalType = 'register'"
|
<button @click="showModal = true; modalType = 'register'"
|
||||||
class="bg-primary hover:bg-primary text-white px-4 py-2 rounded text-sm font-medium transition">Daftar</button>
|
class="bg-primary hover:bg-primary-dark text-white px-4 py-2 rounded text-sm font-medium transition">Daftar</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Mobile menu -->
|
||||||
|
<div x-show="isMobileMenuOpen" @click.away="isMobileMenuOpen = false"
|
||||||
|
x-transition:enter="transition ease-out duration-300"
|
||||||
|
x-transition:enter-start="opacity-0 transform -translate-y-4"
|
||||||
|
x-transition:enter-end="opacity-100 transform translate-y-0"
|
||||||
|
x-transition:leave="transition ease-in duration-200"
|
||||||
|
x-transition:leave-start="opacity-100 transform translate-y-0"
|
||||||
|
x-transition:leave-end="opacity-0 transform -translate-y-4"
|
||||||
|
class="absolute top-full left-0 w-full bg-white shadow-lg mt-2 px-6 py-4 space-y-3 lg:hidden z-50 rounded-b-xl">
|
||||||
|
<button @click="showModal = true; modalType = 'login'"
|
||||||
|
class="block w-full text-left text-sm font-medium text-gray-700 hover:text-primary transition">Masuk</button>
|
||||||
|
<button @click="showModal = true; modalType = 'register'"
|
||||||
|
class="block w-full text-left bg-primary hover:bg-primary-dark text-white px-4 py-2 rounded text-sm font-medium transition">Daftar</button>
|
||||||
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Modal -->
|
<!-- Modal -->
|
||||||
<div x-show="showModal" x-cloak x-transition:enter="transition ease-out duration-300"
|
<div x-show="showModal" x-cloak x-transition:enter="transition ease-out duration-300"
|
||||||
x-transition:enter-start="opacity-0" x-transition:enter-end="opacity-100"
|
x-transition:enter-start="opacity-0" x-transition:enter-end="opacity-100"
|
||||||
|
|
|
@ -9,5 +9,3 @@
|
||||||
Route::get('/venue/{venueName}', [VenueController::class, "venue"])->name('venue');
|
Route::get('/venue/{venueName}', [VenueController::class, "venue"])->name('venue');
|
||||||
|
|
||||||
Auth::routes();
|
Auth::routes();
|
||||||
|
|
||||||
Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home');
|
|
||||||
|
|
Loading…
Reference in New Issue