u
Cette révision appartient à :
Parent
40d675d3fa
révision
bff35003f6
82
app/Http/Controllers/AuthenticationController.php
Fichier normal
82
app/Http/Controllers/AuthenticationController.php
Fichier normal
@ -0,0 +1,82 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use App\Models\Role;
|
||||||
|
use App\Models\User;
|
||||||
|
use App\Http\Requests\Authentication\SignUpRequest;
|
||||||
|
use App\Http\Requests\Authentication\SignInRequest;
|
||||||
|
use Illuminate\Support\Facades\Hash;
|
||||||
|
use Exception;
|
||||||
|
|
||||||
|
class AuthenticationController extends Controller
|
||||||
|
{
|
||||||
|
public function signUpForm()
|
||||||
|
{
|
||||||
|
return view('authentication.register');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function signUpStore(SignUpRequest $request)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$user = new User;
|
||||||
|
$user->name_en = $request->name;
|
||||||
|
$user->contact_en = $request->contact;
|
||||||
|
$user->email = $request->email;
|
||||||
|
$user->password = Hash::make($request->password);
|
||||||
|
$user->role_id = 4;
|
||||||
|
if ($user->save())
|
||||||
|
return redirect('login')->with('success', 'Successfully Registered');
|
||||||
|
else
|
||||||
|
return redirect('login')->with('danger', 'Please Try Again');
|
||||||
|
} catch (Exception $e) {
|
||||||
|
dd($e);
|
||||||
|
return redirect('login')->with('danger', 'Please Try Again');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function signInForm()
|
||||||
|
{
|
||||||
|
return view('authentication.login');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function signInCheck(SignInRequest $request)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$user = User::where('contact_en', $request->username)->orWhere('email', $request->username)->first();
|
||||||
|
if ($user) {
|
||||||
|
if (Hash::check($request->password, $request->username)) {
|
||||||
|
$this->setSession($user);
|
||||||
|
return redirect()->route('dashboard')->with('success', 'Successfully Logged In');
|
||||||
|
} else
|
||||||
|
return redirect()->route('login')->with('error', 'Username or Password is wrong!');
|
||||||
|
} else
|
||||||
|
return redirect()->route('login')->with('error', 'Username or Password is wrong!');
|
||||||
|
} catch (Exception $e) {
|
||||||
|
dd($e);
|
||||||
|
return redirect()->route('login')->with('error', 'Username or Password is wrong!');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setSession($user)
|
||||||
|
{
|
||||||
|
return request()->session()->put(
|
||||||
|
[
|
||||||
|
'userId' => encryptor('encrypt', $user->id),
|
||||||
|
'userName' => encryptor('encrypt', $user->name),
|
||||||
|
'userId' => encryptor('encrypt', $user->id),
|
||||||
|
'role' => encryptor('encrypt', $user->role->type),
|
||||||
|
'roleIdentitiy' => encryptor('encrypt', $user->role->identity),
|
||||||
|
'language' => encryptor('encrypt', $user->language),
|
||||||
|
'image' => $user->image ?? 'No Image Found'
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function signOut()
|
||||||
|
{
|
||||||
|
request()->session()->flush();
|
||||||
|
return redirect('login')->with('error', currentUserId());
|
||||||
|
}
|
||||||
|
}
|
||||||
39
app/Http/Helpers/index.php
Fichier normal
39
app/Http/Helpers/index.php
Fichier normal
@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
//Two way encryption method to encrypt sll data from url
|
||||||
|
|
||||||
|
function encryption($action, $string)
|
||||||
|
{
|
||||||
|
$output = false;
|
||||||
|
|
||||||
|
$encrypt_method = "AES-256-CBC";
|
||||||
|
// pls set your unique hashing key
|
||||||
|
$secret_key = 'beatnik#technolgoy_sampreeti';
|
||||||
|
$secret_iv = 'beatnik$technolgoy@sampreeti';
|
||||||
|
|
||||||
|
//hash
|
||||||
|
$key = hash('sha256', $secret_key);
|
||||||
|
|
||||||
|
//iv - encrypt method AES-256-CBC expects 16 bytes - else you will get a warning
|
||||||
|
$iv = substr(hash('sha256', $secret_iv), 0, 16);
|
||||||
|
|
||||||
|
//do the encryption given text/string/number
|
||||||
|
if ($action == 'encrypt') {
|
||||||
|
$output = openssl_encrypt($string, $encrypt_method, $key, 0, $iv);
|
||||||
|
$output = base64_encode($output);
|
||||||
|
} else if ($action == 'decrypt') {
|
||||||
|
//decrypt the given text/string/number
|
||||||
|
$output = openssl_decrypt(base64_decode($string), $encrypt_method, $key, 0, $iv);
|
||||||
|
}
|
||||||
|
return $output;
|
||||||
|
}
|
||||||
|
|
||||||
|
function currentUserId()
|
||||||
|
{
|
||||||
|
return encryptor('decrypt', request()->session()->get('userId'));
|
||||||
|
}
|
||||||
|
|
||||||
|
function currentUser()
|
||||||
|
{
|
||||||
|
return encryptor('decrypt', request()->session()->get('roleIdentity'));
|
||||||
|
}
|
||||||
35
app/Http/Middleware/isSuperadmin.php
Fichier normal
35
app/Http/Middleware/isSuperadmin.php
Fichier normal
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Closure;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
|
use App\Models\User; //added
|
||||||
|
use Session; //added
|
||||||
|
|
||||||
|
class isSuperadmin
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Handle an incoming request.
|
||||||
|
*
|
||||||
|
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
|
||||||
|
*/
|
||||||
|
public function handle(Request $request, Closure $next): Response
|
||||||
|
{
|
||||||
|
if (!Session::has('userId') || Session::has('userId') == null || !Session::has('roleIdentity')) {
|
||||||
|
return redirect()->route('logOut');
|
||||||
|
} else {
|
||||||
|
$user = User::findOrFail(currentUserId());
|
||||||
|
app()->setLocale($user->language); //language
|
||||||
|
if (!$user) {
|
||||||
|
return redirect()->route('logOut');
|
||||||
|
} else if (currentUser() != 'superadmin') {
|
||||||
|
return redirect()->back()->with('danger', 'Access Denied');
|
||||||
|
} else {
|
||||||
|
return $next($request);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return redirect()->route('logOut');
|
||||||
|
}
|
||||||
|
}
|
||||||
29
app/Http/Requests/Authentication/SignInRequest.php
Fichier normal
29
app/Http/Requests/Authentication/SignInRequest.php
Fichier normal
@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Requests\Authentication;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
|
|
||||||
|
class SignInRequest extends FormRequest
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Determine if the user is authorized to make this request.
|
||||||
|
*/
|
||||||
|
public function authorize(): bool
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the validation rules that apply to the request.
|
||||||
|
*
|
||||||
|
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
|
||||||
|
*/
|
||||||
|
public function rules(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'username' => 'required',
|
||||||
|
'password' => 'required'
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
31
app/Http/Requests/Authentication/SignUpRequest.php
Fichier normal
31
app/Http/Requests/Authentication/SignUpRequest.php
Fichier normal
@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Requests\Authentication;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
|
|
||||||
|
class SignUpRequest extends FormRequest
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Determine if the user is authorized to make this request.
|
||||||
|
*/
|
||||||
|
public function authorize(): bool
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the validation rules that apply to the request.
|
||||||
|
*
|
||||||
|
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
|
||||||
|
*/
|
||||||
|
public function rules(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'name'=>'required|max:255',
|
||||||
|
'contact_en'=>'required|unique:users',
|
||||||
|
'email'=> 'required|unique:users',
|
||||||
|
'password'=>'required|confirmed',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
11
app/Models/Role.php
Fichier normal
11
app/Models/Role.php
Fichier normal
@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Role extends Model
|
||||||
|
{
|
||||||
|
use HasFactory;
|
||||||
|
}
|
||||||
@ -2,44 +2,10 @@
|
|||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
// use Illuminate\Contracts\Auth\MustVerifyEmail;
|
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Notifications\Notifiable;
|
|
||||||
use Laravel\Sanctum\HasApiTokens;
|
|
||||||
|
|
||||||
class User extends Authenticatable
|
class User extends Model
|
||||||
{
|
{
|
||||||
use HasApiTokens, HasFactory, Notifiable;
|
use HasFactory;
|
||||||
|
|
||||||
/**
|
|
||||||
* The attributes that are mass assignable.
|
|
||||||
*
|
|
||||||
* @var array<int, string>
|
|
||||||
*/
|
|
||||||
protected $fillable = [
|
|
||||||
'name',
|
|
||||||
'email',
|
|
||||||
'password',
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The attributes that should be hidden for serialization.
|
|
||||||
*
|
|
||||||
* @var array<int, string>
|
|
||||||
*/
|
|
||||||
protected $hidden = [
|
|
||||||
'password',
|
|
||||||
'remember_token',
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The attributes that should be cast.
|
|
||||||
*
|
|
||||||
* @var array<string, string>
|
|
||||||
*/
|
|
||||||
protected $casts = [
|
|
||||||
'email_verified_at' => 'datetime',
|
|
||||||
'password' => 'hashed',
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,7 +26,9 @@
|
|||||||
"App\\": "app/",
|
"App\\": "app/",
|
||||||
"Database\\Factories\\": "database/factories/",
|
"Database\\Factories\\": "database/factories/",
|
||||||
"Database\\Seeders\\": "database/seeders/"
|
"Database\\Seeders\\": "database/seeders/"
|
||||||
}
|
}, "files":[
|
||||||
|
"app/Http/Helpers/index.php"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"autoload-dev": {
|
"autoload-dev": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
|||||||
40
database/migrations/2023_11_12_031402_create_users_table.php
Fichier normal
40
database/migrations/2023_11_12_031402_create_users_table.php
Fichier normal
@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('users', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('name_en');
|
||||||
|
$table->string('name_bn')->nullable();
|
||||||
|
$table->string('email')->unique();
|
||||||
|
$table->string('contact_en')->unique();
|
||||||
|
$table->string('contact_bn')->unique()->nullable();
|
||||||
|
$table->unsignedBigInteger('role_id')->index();
|
||||||
|
$table->foreign('role_id')->references('id')->on('roles')->onDelete('cascade');
|
||||||
|
$table->string('password');
|
||||||
|
$table->string('language')->default('en');
|
||||||
|
$table->string('image')->nullable();
|
||||||
|
$table->boolean('status')->default(1)->comment('1=>active 2=>inactive');
|
||||||
|
$table->rememberToken();
|
||||||
|
$table->timestamps();
|
||||||
|
$table->softDeletes();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('users');
|
||||||
|
}
|
||||||
|
};
|
||||||
54
database/migrations/2023_11_12_031415_create_roles_table.php
Fichier normal
54
database/migrations/2023_11_12_031415_create_roles_table.php
Fichier normal
@ -0,0 +1,54 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Carbon\Carbon;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::create('roles', function (Blueprint $table) {
|
||||||
|
$table->id();
|
||||||
|
$table->string('type', 20)->unique();
|
||||||
|
$table->string('identity', 30)->unique();
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
|
||||||
|
DB::table('roles')->insert([
|
||||||
|
[
|
||||||
|
'type'=> 'Super Admin',
|
||||||
|
'identity'=> 'superadmin',
|
||||||
|
'created_at'=> Carbon::now()
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'type'=> 'Admin',
|
||||||
|
'identity'=> 'admin',
|
||||||
|
'created_at'=> Carbon::now()
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'type'=> 'Instructor',
|
||||||
|
'identity'=> 'instructor',
|
||||||
|
'created_at'=> Carbon::now()
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'type'=> 'Student',
|
||||||
|
'identity'=> 'student',
|
||||||
|
'created_at'=> Carbon::now()
|
||||||
|
]
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('roles');
|
||||||
|
}
|
||||||
|
};
|
||||||
66
resources/views/Authentication/login.blade.php
Fichier normal
66
resources/views/Authentication/login.blade.php
Fichier normal
@ -0,0 +1,66 @@
|
|||||||
|
@extends('layouts.appAuth')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
<body class="h-100">
|
||||||
|
<div class="authincation h-100">
|
||||||
|
<div class="container h-100">
|
||||||
|
<div class="row justify-content-center h-100 align-items-center">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="authincation-content">
|
||||||
|
<div class="row no-gutters">
|
||||||
|
<div class="col-xl-12">
|
||||||
|
<div class="auth-form">
|
||||||
|
<h4 class="text-center mb-4">Sign in your account</h4>
|
||||||
|
<form action="{{route('login.check')}}" method="POST">
|
||||||
|
@csrf
|
||||||
|
<div class="form-group">
|
||||||
|
<label><strong>Email or Phone</strong></label>
|
||||||
|
<input type="text" class="form-control" value="{{old('username')}}"
|
||||||
|
name="username" id="username">
|
||||||
|
@if($errors->has('username'))
|
||||||
|
<small class="d-block text-danger">{{$errors->first('username')}}</small>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label><strong>Password</strong></label>
|
||||||
|
<input type="password" class="form-control" value="{{old('password')}}"
|
||||||
|
name="password" id="password">
|
||||||
|
@if($errors->has('password'))
|
||||||
|
<small class="d-block text-danger">{{$errors->first('password')}}</small>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
<div class="form-row d-flex justify-content-between mt-4 mb-2">
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="custom-control custom-checkbox ml-1">
|
||||||
|
<input type="checkbox" class="custom-control-input"
|
||||||
|
id="basic_checkbox_1">
|
||||||
|
<label class="custom-control-label" for="basic_checkbox_1">Remember
|
||||||
|
my preference</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<a href="page-forgot-password.html">Forgot Password?</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="text-center">
|
||||||
|
<button type="submit" class="btn btn-primary btn-block">Sign me in</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<div class="new-account mt-3">
|
||||||
|
<p>Don't have an account? <a class="text-primary"
|
||||||
|
href="{{route('register')}}">Sign
|
||||||
|
up</a></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
@endsection
|
||||||
67
resources/views/Authentication/register.blade.php
Fichier normal
67
resources/views/Authentication/register.blade.php
Fichier normal
@ -0,0 +1,67 @@
|
|||||||
|
@extends('layouts.appAuth')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
<body class="h-100">
|
||||||
|
<div class="authincation h-100">
|
||||||
|
<div class="container h-100">
|
||||||
|
<div class="row justify-content-center h-100 align-items-center">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="authincation-content">
|
||||||
|
<div class="row no-gutters">
|
||||||
|
<div class="col-xl-12">
|
||||||
|
<div class="auth-form">
|
||||||
|
<h4 class="text-center mb-4">Sign up your account</h4>
|
||||||
|
<form action="{{route('register.store')}}" method="POST">
|
||||||
|
@csrf
|
||||||
|
<div class="form-group">
|
||||||
|
<label><strong>Full Name</strong></label>
|
||||||
|
<input type="text" class="form-control" value="{{old('name')}}" name="name" id="name" placeholder="Enter your Full Name">
|
||||||
|
@if($errors->has('name'))
|
||||||
|
<small class="d-block text-danger">{{$errors->first('name')}}</small>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label><strong>Email</strong></label>
|
||||||
|
<input type="email" class="form-control" value="{{old('email')}}" name="email" id="email" placeholder="Enter Email Address">
|
||||||
|
@if($errors->has('email'))
|
||||||
|
<small class="d-block text-danger">{{$errors->first('email')}}</small>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label><strong>Phone Number</strong></label>
|
||||||
|
<input type="text" class="form-control" value="{{old('contact_en')}}" name="contact_en" id="contact_en" placeholder="Enter Contact No">
|
||||||
|
@if($errors->has('contact_en'))
|
||||||
|
<small class="d-block text-danger">{{$errors->first('contact_en')}}</small>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label><strong>Password</strong></label>
|
||||||
|
<input type="password" class="form-control" name="password" id="password" placeholder="Enter Password">
|
||||||
|
@if($errors->has('password'))
|
||||||
|
<small class="d-block text-danger">{{$errors->first('password')}}</small>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label><strong>Confirm Password</strong></label>
|
||||||
|
<input type="password" class="form-control" name="password_confirmation" id="password_confirmation" placeholder="Re-enter Password">
|
||||||
|
</div>
|
||||||
|
<div class="text-center mt-4">
|
||||||
|
<button type="submit" class="btn btn-primary btn-block">Sign me up</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<div class="new-account mt-3">
|
||||||
|
<p>Already have an account? <a class="text-primary" href="{{route('login')}}">Sign
|
||||||
|
in</a></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
@endsection
|
||||||
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<!--**********************************
|
<!--**********************************
|
||||||
Main wrapper start
|
Main wrapper start
|
||||||
@ -477,6 +477,6 @@ class="feather feather-log-out">
|
|||||||
<script src="{{asset('public/vendor/svganimation/svg.animation.js')}}"></script>
|
<script src="{{asset('public/vendor/svganimation/svg.animation.js')}}"></script>
|
||||||
<script src="{{asset('js/styleSwitcher.js')}}"></script>
|
<script src="{{asset('js/styleSwitcher.js')}}"></script>
|
||||||
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
105
resources/views/layouts/appAuth.blade.php
Fichier normal
105
resources/views/layouts/appAuth.blade.php
Fichier normal
@ -0,0 +1,105 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||||
|
<title>Edumin - Bootstrap Admin Dashboard </title>
|
||||||
|
<!-- Favicon icon -->
|
||||||
|
<link rel="icon" type="image/png" sizes="16x16" href="{{asset('public/images/favicon.png')}}">
|
||||||
|
<link rel="stylesheet" href="{{asset('public/vendor/jqvmap/css/jqvmap.min.css')}}">
|
||||||
|
<link rel="stylesheet" href="{{asset('public/vendor/chartist/css/chartist.min.css')}}">
|
||||||
|
<link rel="stylesheet" href="{{asset('public/vendor/bootstrap-select/dist/css/bootstrap-select.min.css')}}">
|
||||||
|
<link rel="stylesheet" href="{{asset('public/css/style.css')}}">
|
||||||
|
<link rel="stylesheet" href="{{asset('public/css/skin-2.css')}}">
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!--**********************************
|
||||||
|
Main wrapper start
|
||||||
|
***********************************-->
|
||||||
|
<div id="main-wrapper">
|
||||||
|
|
||||||
|
|
||||||
|
@yield('content')
|
||||||
|
|
||||||
|
|
||||||
|
<!--**********************************
|
||||||
|
Footer start
|
||||||
|
***********************************-->
|
||||||
|
<div class="footer">
|
||||||
|
<div class="copyright">
|
||||||
|
<p>Copyright © Designed & Developed by <a href="../index.htm" target="_blank">DexignLab</a> 2020</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--**********************************
|
||||||
|
Footer end
|
||||||
|
***********************************-->
|
||||||
|
|
||||||
|
<!--**********************************
|
||||||
|
Support ticket button start
|
||||||
|
***********************************-->
|
||||||
|
|
||||||
|
<!--**********************************
|
||||||
|
Support ticket button end
|
||||||
|
***********************************-->
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!--**********************************
|
||||||
|
Main wrapper end
|
||||||
|
***********************************-->
|
||||||
|
|
||||||
|
<!--**********************************
|
||||||
|
Scripts
|
||||||
|
***********************************-->
|
||||||
|
<!-- Required vendors -->
|
||||||
|
<script src="{{asset('public/vendor/global/global.min.js')}}"></script>
|
||||||
|
<script src="{{asset('public/vendor/bootstrap-select/dist/js/bootstrap-select.min.js')}}"></script>
|
||||||
|
<script src="{{asset('public/js/custom.min.js')}}"></script>
|
||||||
|
<script src="{{asset('public/js/dlabnav-init.js')}}"></script>
|
||||||
|
|
||||||
|
<!-- Chart ChartJS plugin files -->
|
||||||
|
<script src="{{asset('public/vendor/chart.js/Chart.bundle.min.js')}}"></script>
|
||||||
|
|
||||||
|
<!-- Chart piety plugin files -->
|
||||||
|
<script src="{{asset('public/vendor/peity/jquery.peity.min.js')}}"></script>
|
||||||
|
|
||||||
|
<!-- Chart sparkline plugin files -->
|
||||||
|
<script src="{{asset('public/vendor/jquery-sparkline/jquery.sparkline.min.js')}}"></script>
|
||||||
|
|
||||||
|
<!-- Demo scripts -->
|
||||||
|
<script src="{{asset('public/js/dashboard/dashboard-3.js')}}"></script>
|
||||||
|
|
||||||
|
<!-- Svganimation scripts -->
|
||||||
|
<script src="{{asset('public/vendor/svganimation/vivus.min.js')}}"></script>
|
||||||
|
<script src="{{asset('public/vendor/svganimation/svg.animation.js')}}"></script>
|
||||||
|
<script src="{{asset('js/styleSwitcher.js')}}"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{{-- TOASTER --}}
|
||||||
|
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.js"></script>
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.css" />
|
||||||
|
<script>
|
||||||
|
@if(Session::has('success'))
|
||||||
|
toastr.success("{{ Session::get('success') }}");
|
||||||
|
@endif
|
||||||
|
@if(Session::has('info'))
|
||||||
|
toastr.info("{{ Session::get('info') }}");
|
||||||
|
@endif
|
||||||
|
@if(Session::has('warning'))
|
||||||
|
toastr.warning("{{ Session::get('warning') }}");
|
||||||
|
@endif
|
||||||
|
@if(Session::has('error'))
|
||||||
|
toastr.error("{{ Session::get('error') }}");
|
||||||
|
@endif
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
</html>
|
||||||
@ -2,10 +2,11 @@
|
|||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
||||||
<!--**********************************
|
<body>
|
||||||
|
<!--**********************************
|
||||||
Content body start
|
Content body start
|
||||||
***********************************-->
|
***********************************-->
|
||||||
<div class="content-body">
|
<div class="content-body">
|
||||||
<!-- row -->
|
<!-- row -->
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
|
|
||||||
@ -343,8 +344,9 @@
|
|||||||
<a href="javascript:void(0);">
|
<a href="javascript:void(0);">
|
||||||
<div class="media d-flex align-items-center">
|
<div class="media d-flex align-items-center">
|
||||||
<div class="avatar avatar-xl mr-2">
|
<div class="avatar avatar-xl mr-2">
|
||||||
<img class="rounded-circle img-fluid" src="{{asset('public/images/avatar/5.png')}}"
|
<img class="rounded-circle img-fluid"
|
||||||
width="30" alt="">
|
src="{{asset('public/images/avatar/5.png')}}" width="30"
|
||||||
|
alt="">
|
||||||
</div>
|
</div>
|
||||||
<div class="media-body">
|
<div class="media-body">
|
||||||
<h5 class="mb-0 fs--1">Ricky Antony</h5>
|
<h5 class="mb-0 fs--1">Ricky Antony</h5>
|
||||||
@ -368,8 +370,9 @@ class="la la-trash-o"></i></a>
|
|||||||
<a href="javascript:void(0);">
|
<a href="javascript:void(0);">
|
||||||
<div class="media d-flex align-items-center">
|
<div class="media d-flex align-items-center">
|
||||||
<div class="avatar avatar-xl mr-2">
|
<div class="avatar avatar-xl mr-2">
|
||||||
<img class="rounded-circle img-fluid" src="{{asset('public/images/avatar/1.png')}}"
|
<img class="rounded-circle img-fluid"
|
||||||
alt="" width="30">
|
src="{{asset('public/images/avatar/1.png')}}" alt=""
|
||||||
|
width="30">
|
||||||
</div>
|
</div>
|
||||||
<div class="media-body">
|
<div class="media-body">
|
||||||
<h5 class="mb-0 fs--1">Emma Watson</h5>
|
<h5 class="mb-0 fs--1">Emma Watson</h5>
|
||||||
@ -393,8 +396,9 @@ class="la la-trash-o"></i></a>
|
|||||||
<a href="javascript:void(0);">
|
<a href="javascript:void(0);">
|
||||||
<div class="media d-flex align-items-center">
|
<div class="media d-flex align-items-center">
|
||||||
<div class="avatar avatar-xl mr-2">
|
<div class="avatar avatar-xl mr-2">
|
||||||
<img class="rounded-circle img-fluid" src="{{asset('public/images/avatar/5.png')}}"
|
<img class="rounded-circle img-fluid"
|
||||||
width="30" alt="">
|
src="{{asset('public/images/avatar/5.png')}}" width="30"
|
||||||
|
alt="">
|
||||||
</div>
|
</div>
|
||||||
<div class="media-body">
|
<div class="media-body">
|
||||||
<h5 class="mb-0 fs--1">Rowen Atkinson</h5>
|
<h5 class="mb-0 fs--1">Rowen Atkinson</h5>
|
||||||
@ -418,8 +422,9 @@ class="la la-trash-o"></i></a>
|
|||||||
<a href="javascript:void(0);">
|
<a href="javascript:void(0);">
|
||||||
<div class="media d-flex align-items-center">
|
<div class="media d-flex align-items-center">
|
||||||
<div class="avatar avatar-xl mr-2">
|
<div class="avatar avatar-xl mr-2">
|
||||||
<img class="rounded-circle img-fluid" src="{{asset('public/images/avatar/1.png')}}"
|
<img class="rounded-circle img-fluid"
|
||||||
alt="" width="30">
|
src="{{asset('public/images/avatar/1.png')}}" alt=""
|
||||||
|
width="30">
|
||||||
</div>
|
</div>
|
||||||
<div class="media-body">
|
<div class="media-body">
|
||||||
<h5 class="mb-0 fs--1">Antony Hopkins</h5>
|
<h5 class="mb-0 fs--1">Antony Hopkins</h5>
|
||||||
@ -443,8 +448,9 @@ class="la la-trash-o"></i></a>
|
|||||||
<a href="javascript:void(0);">
|
<a href="javascript:void(0);">
|
||||||
<div class="media d-flex align-items-center">
|
<div class="media d-flex align-items-center">
|
||||||
<div class="avatar avatar-xl mr-2">
|
<div class="avatar avatar-xl mr-2">
|
||||||
<img class="rounded-circle img-fluid" src="{{asset('public/images/avatar/1.png')}}"
|
<img class="rounded-circle img-fluid"
|
||||||
alt="" width="30">
|
src="{{asset('public/images/avatar/1.png')}}" alt=""
|
||||||
|
width="30">
|
||||||
</div>
|
</div>
|
||||||
<div class="media-body">
|
<div class="media-body">
|
||||||
<h5 class="mb-0 fs--1">Jennifer Schramm</h5>
|
<h5 class="mb-0 fs--1">Jennifer Schramm</h5>
|
||||||
@ -468,8 +474,9 @@ class="la la-trash-o"></i></a>
|
|||||||
<a href="javascript:void(0);">
|
<a href="javascript:void(0);">
|
||||||
<div class="media d-flex align-items-center">
|
<div class="media d-flex align-items-center">
|
||||||
<div class="avatar avatar-xl mr-2">
|
<div class="avatar avatar-xl mr-2">
|
||||||
<img class="rounded-circle img-fluid" src="{{asset('public/images/avatar/5.png')}}"
|
<img class="rounded-circle img-fluid"
|
||||||
width="30" alt="">
|
src="{{asset('public/images/avatar/5.png')}}" width="30"
|
||||||
|
alt="">
|
||||||
</div>
|
</div>
|
||||||
<div class="media-body">
|
<div class="media-body">
|
||||||
<h5 class="mb-0 fs--1">Raymond Mims</h5>
|
<h5 class="mb-0 fs--1">Raymond Mims</h5>
|
||||||
@ -493,8 +500,9 @@ class="la la-trash-o"></i></a>
|
|||||||
<a href="javascript:void(0);">
|
<a href="javascript:void(0);">
|
||||||
<div class="media d-flex align-items-center">
|
<div class="media d-flex align-items-center">
|
||||||
<div class="avatar avatar-xl mr-2">
|
<div class="avatar avatar-xl mr-2">
|
||||||
<img class="rounded-circle img-fluid" src="{{asset('public/images/avatar/1.png')}}"
|
<img class="rounded-circle img-fluid"
|
||||||
alt="" width="30">
|
src="{{asset('public/images/avatar/1.png')}}" alt=""
|
||||||
|
width="30">
|
||||||
</div>
|
</div>
|
||||||
<div class="media-body">
|
<div class="media-body">
|
||||||
<h5 class="mb-0 fs--1">Michael Jenkins</h5>
|
<h5 class="mb-0 fs--1">Michael Jenkins</h5>
|
||||||
@ -521,9 +529,10 @@ class="la la-trash-o"></i></a>
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--**********************************
|
<!--**********************************
|
||||||
Content body end
|
Content body end
|
||||||
***********************************-->
|
***********************************-->
|
||||||
|
</body>
|
||||||
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
|
use App\Http\Controllers\AuthenticationController as auth;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@ -13,6 +14,16 @@
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
Route::get('/register', [auth::class, 'signUpForm'])->name('register');
|
||||||
|
Route::post('/register', [auth::class, 'signUpStore'])->name('register.store');
|
||||||
|
Route::get('/login', [auth::class, 'signInForm'])->name('login');
|
||||||
|
Route::post('/login', [auth::class, 'signInCheck'])->name('login.check');
|
||||||
|
Route::get('/logout', [auth::class, 'signOut'])->name('logOut');
|
||||||
|
|
||||||
|
|
||||||
Route::get('/', function () {
|
Route::get('/', function () {
|
||||||
return view('welcome');
|
return view('welcome');
|
||||||
});
|
});
|
||||||
|
Route::get('/dashboard', function () {
|
||||||
|
return view('welcome');
|
||||||
|
})->name('dashboard');
|
||||||
|
|||||||
Chargement…
Référencer dans un nouveau ticket
Block a user