u
Cette révision appartient à :
Parent
bff35003f6
révision
a092f51157
@ -22,10 +22,11 @@ public function signUpStore(SignUpRequest $request)
|
||||
try {
|
||||
$user = new User;
|
||||
$user->name_en = $request->name;
|
||||
$user->contact_en = $request->contact;
|
||||
$user->contact_en = $request->contact_en;
|
||||
$user->email = $request->email;
|
||||
$user->password = Hash::make($request->password);
|
||||
$user->role_id = 4;
|
||||
// dd($request->all());
|
||||
if ($user->save())
|
||||
return redirect('login')->with('success', 'Successfully Registered');
|
||||
else
|
||||
@ -46,7 +47,7 @@ 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)) {
|
||||
if (Hash::check($request->password, $user->password)) {
|
||||
$this->setSession($user);
|
||||
return redirect()->route('dashboard')->with('success', 'Successfully Logged In');
|
||||
} else
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
//Two way encryption method to encrypt sll data from url
|
||||
|
||||
function encryption($action, $string)
|
||||
function encryptor($action, $string)
|
||||
{
|
||||
$output = false;
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ class SignInRequest extends FormRequest
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -11,7 +11,7 @@ class SignUpRequest extends FormRequest
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -8,4 +8,9 @@
|
||||
class Role extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
// relation with user
|
||||
public function users(){
|
||||
return $this->hasMany(User::class);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,9 +3,36 @@
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Laravel\Sanctum\HasApiTokens;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class User extends Model
|
||||
class User extends Authenticatable
|
||||
{
|
||||
use HasFactory;
|
||||
use HasFactory, HasApiTokens, Notifiable, SoftDeletes;
|
||||
|
||||
// The attributes that are mass assignable.
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'email',
|
||||
'password',
|
||||
];
|
||||
|
||||
// The attributes that should be hidden for serialization.
|
||||
protected $hidden = [
|
||||
'password',
|
||||
'remember_token',
|
||||
];
|
||||
|
||||
// The attributes that should be cast.
|
||||
protected $casts = [
|
||||
'email_verified_at' => 'datetime',
|
||||
];
|
||||
|
||||
// relation with role
|
||||
public function role()
|
||||
{
|
||||
return $this->belongsTo(Role::class);
|
||||
}
|
||||
}
|
||||
|
||||
60
composer.lock
générée
60
composer.lock
générée
@ -505,24 +505,24 @@
|
||||
},
|
||||
{
|
||||
"name": "graham-campbell/result-type",
|
||||
"version": "v1.1.1",
|
||||
"version": "v1.1.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/GrahamCampbell/Result-Type.git",
|
||||
"reference": "672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831"
|
||||
"reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831",
|
||||
"reference": "672eff8cf1d6fe1ef09ca0f89c4b287d6a3eb831",
|
||||
"url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/fbd48bce38f73f8a4ec8583362e732e4095e5862",
|
||||
"reference": "fbd48bce38f73f8a4ec8583362e732e4095e5862",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.2.5 || ^8.0",
|
||||
"phpoption/phpoption": "^1.9.1"
|
||||
"phpoption/phpoption": "^1.9.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^8.5.32 || ^9.6.3 || ^10.0.12"
|
||||
"phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
@ -551,7 +551,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/GrahamCampbell/Result-Type/issues",
|
||||
"source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.1"
|
||||
"source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.2"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -563,7 +563,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2023-02-25T20:23:15+00:00"
|
||||
"time": "2023-11-12T22:16:48+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/guzzle",
|
||||
@ -2317,16 +2317,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpoption/phpoption",
|
||||
"version": "1.9.1",
|
||||
"version": "1.9.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/schmittjoh/php-option.git",
|
||||
"reference": "dd3a383e599f49777d8b628dadbb90cae435b87e"
|
||||
"reference": "80735db690fe4fc5c76dfa7f9b770634285fa820"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/schmittjoh/php-option/zipball/dd3a383e599f49777d8b628dadbb90cae435b87e",
|
||||
"reference": "dd3a383e599f49777d8b628dadbb90cae435b87e",
|
||||
"url": "https://api.github.com/repos/schmittjoh/php-option/zipball/80735db690fe4fc5c76dfa7f9b770634285fa820",
|
||||
"reference": "80735db690fe4fc5c76dfa7f9b770634285fa820",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -2334,7 +2334,7 @@
|
||||
},
|
||||
"require-dev": {
|
||||
"bamarni/composer-bin-plugin": "^1.8.2",
|
||||
"phpunit/phpunit": "^8.5.32 || ^9.6.3 || ^10.0.12"
|
||||
"phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
@ -2376,7 +2376,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/schmittjoh/php-option/issues",
|
||||
"source": "https://github.com/schmittjoh/php-option/tree/1.9.1"
|
||||
"source": "https://github.com/schmittjoh/php-option/tree/1.9.2"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -2388,7 +2388,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2023-02-25T19:38:58+00:00"
|
||||
"time": "2023-11-12T21:59:55+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/clock",
|
||||
@ -5413,31 +5413,31 @@
|
||||
},
|
||||
{
|
||||
"name": "vlucas/phpdotenv",
|
||||
"version": "v5.5.0",
|
||||
"version": "v5.6.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/vlucas/phpdotenv.git",
|
||||
"reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7"
|
||||
"reference": "2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7",
|
||||
"reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7",
|
||||
"url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4",
|
||||
"reference": "2cf9fb6054c2bb1d59d1f3817706ecdb9d2934c4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-pcre": "*",
|
||||
"graham-campbell/result-type": "^1.0.2",
|
||||
"php": "^7.1.3 || ^8.0",
|
||||
"phpoption/phpoption": "^1.8",
|
||||
"symfony/polyfill-ctype": "^1.23",
|
||||
"symfony/polyfill-mbstring": "^1.23.1",
|
||||
"symfony/polyfill-php80": "^1.23.1"
|
||||
"graham-campbell/result-type": "^1.1.2",
|
||||
"php": "^7.2.5 || ^8.0",
|
||||
"phpoption/phpoption": "^1.9.2",
|
||||
"symfony/polyfill-ctype": "^1.24",
|
||||
"symfony/polyfill-mbstring": "^1.24",
|
||||
"symfony/polyfill-php80": "^1.24"
|
||||
},
|
||||
"require-dev": {
|
||||
"bamarni/composer-bin-plugin": "^1.4.1",
|
||||
"bamarni/composer-bin-plugin": "^1.8.2",
|
||||
"ext-filter": "*",
|
||||
"phpunit/phpunit": "^7.5.20 || ^8.5.30 || ^9.5.25"
|
||||
"phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-filter": "Required to use the boolean validator."
|
||||
@ -5449,7 +5449,7 @@
|
||||
"forward-command": true
|
||||
},
|
||||
"branch-alias": {
|
||||
"dev-master": "5.5-dev"
|
||||
"dev-master": "5.6-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@ -5481,7 +5481,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/vlucas/phpdotenv/issues",
|
||||
"source": "https://github.com/vlucas/phpdotenv/tree/v5.5.0"
|
||||
"source": "https://github.com/vlucas/phpdotenv/tree/v5.6.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -5493,7 +5493,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-10-16T01:01:54+00:00"
|
||||
"time": "2023-11-12T22:43:29+00:00"
|
||||
},
|
||||
{
|
||||
"name": "voku/portable-ascii",
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
@extends('layouts.appAuth')
|
||||
@section('title', 'Log In')
|
||||
|
||||
@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">
|
||||
@ -48,8 +48,7 @@
|
||||
</div>
|
||||
</form>
|
||||
<div class="new-account mt-3">
|
||||
<p>Don't have an account? <a class="text-primary"
|
||||
href="{{route('register')}}">Sign
|
||||
<p>Don't have an account? <a class="text-primary" href="{{route('register')}}">Sign
|
||||
up</a></p>
|
||||
</div>
|
||||
</div>
|
||||
@ -61,6 +60,4 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
||||
@endsection
|
||||
@ -1,8 +1,8 @@
|
||||
@extends('layouts.appAuth')
|
||||
@section('title', 'Registraion')
|
||||
|
||||
@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">
|
||||
@ -16,35 +16,40 @@
|
||||
@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">
|
||||
<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">
|
||||
<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">
|
||||
<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">
|
||||
<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">
|
||||
<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>
|
||||
@ -62,6 +67,5 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@endsection
|
||||
@ -1,12 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang="{{str_replace('_','_', app()->getLocale())}}">
|
||||
|
||||
<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>
|
||||
<title>{{ENV('APP_NAME')}} | @yield('title')</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')}}">
|
||||
@ -17,12 +17,13 @@
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
<!--**********************************
|
||||
Main wrapper start
|
||||
***********************************-->
|
||||
<div id="main-wrapper">
|
||||
|
||||
|
||||
<!--**********************************
|
||||
Nav header start
|
||||
@ -58,8 +59,7 @@
|
||||
</span>
|
||||
<div class="dropdown-menu p-0 m-0">
|
||||
<form>
|
||||
<input class="form-control" type="search" placeholder="Search"
|
||||
aria-label="Search">
|
||||
<input class="form-control" type="search" placeholder="Search" aria-label="Search">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@ -162,8 +162,7 @@ class="ti-arrow-right"></i></a>
|
||||
<a href="page-login.html" class="dropdown-item ai-icon">
|
||||
<svg id="icon-logout" xmlns="http://www.w3.org/2000/svg" width="18" height="18"
|
||||
viewbox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round"
|
||||
class="feather feather-log-out">
|
||||
stroke-linecap="round" stroke-linejoin="round" class="feather feather-log-out">
|
||||
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path>
|
||||
<polyline points="16 17 21 12 16 7"></polyline>
|
||||
<line x1="21" y1="12" x2="9" y2="12"></line>
|
||||
@ -444,9 +443,6 @@ class="feather feather-log-out">
|
||||
<!--**********************************
|
||||
Support ticket button end
|
||||
***********************************-->
|
||||
|
||||
|
||||
</div>
|
||||
<!--**********************************
|
||||
Main wrapper end
|
||||
***********************************-->
|
||||
@ -477,6 +473,6 @@ class="feather feather-log-out">
|
||||
<script src="{{asset('public/vendor/svganimation/svg.animation.js')}}"></script>
|
||||
<script src="{{asset('js/styleSwitcher.js')}}"></script>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@ -1,86 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang="{{str_replace('_','_', app()->getLocale())}}" class="h-100">
|
||||
|
||||
<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>
|
||||
<title>{{ENV('APP_NAME')}} | @yield('title') </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')}}">
|
||||
<link href="{{asset('public/css/style.css')}}" rel="stylesheet">
|
||||
|
||||
</head>
|
||||
|
||||
|
||||
|
||||
<!--**********************************
|
||||
Main wrapper start
|
||||
***********************************-->
|
||||
<div id="main-wrapper">
|
||||
|
||||
<body class="h-100">
|
||||
|
||||
@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>
|
||||
|
||||
|
||||
<!--endRemoveIf(production)-->
|
||||
|
||||
{{-- TOASTER --}}
|
||||
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
|
||||
@ -100,6 +43,6 @@
|
||||
toastr.error("{{ Session::get('error') }}");
|
||||
@endif
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@ -1,8 +1,8 @@
|
||||
@extends('layouts.app')
|
||||
@section('title', 'Dashboard')
|
||||
|
||||
@section('content')
|
||||
|
||||
<body>
|
||||
<div id="main-wrapper">
|
||||
<!--**********************************
|
||||
Content body start
|
||||
***********************************-->
|
||||
@ -530,9 +530,9 @@ class="la la-trash-o"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--**********************************
|
||||
Content body end
|
||||
***********************************-->
|
||||
</body>
|
||||
|
||||
@endsection
|
||||
Chargement…
Référencer dans un nouveau ticket
Block a user