why the css style did not working ? ( Laravel ) - php

I want to ask something because I don't quite understand the file.
I want to create a Login/Register for a User and I found a tutorial to create the login and register I want.
Here tutorial website link : https://medium.com/geekculture/customize-the-login-and-register-page-for-user-admin-in-laravel-v8-9e42127d0185
and also github complete file : https://github.com/sgwebfreelancer/laravel_auth_tutorial
In the tutorial has provided a complete file with login/register for User and also Admin Panel.
But there are some problems where the css file does not seem to work and the login and register design becomes empty. It should have like a picture. Below me as well as how login and register should be:
in this tutorial it should be like this :
So how to solved this problem ? it is have any problem with css or app.blade.php file ?
login.blade.php
#extends('layouts.app')
#section('content')
<div class="container-scroller">
<div class="container-fluid page-body-wrapper full-page-wrapper">
<div class="content-wrapper d-flex align-items-center auth auth-bg-1 theme-one">
<div class="row w-100">
<div class="col-lg-4 mx-auto">
<div class="auto-form-wrapper">
<form method="POST" action="{{ route('login') }}">
#csrf
<div class="form-group">
<label class="label">Email</label>
<div class="input-group">
<input id="email" type="email"
class="form-control #error('email') is-invalid #enderror" name="email"
value="{{ old('email') }}" required autocomplete="email" autofocus>
<div class="input-group-append">
<span class="input-group-text">
<i class="mdi mdi-check-circle-outline"></i>
</span>
</div>
#error('email')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
#enderror
</div>
</div>
<div class="form-group">
<label class="label">Password</label>
<div class="input-group">
<input id="password" type="password"
class="form-control #error('password') is-invalid #enderror" name="password"
required autocomplete="current-password">
<div class="input-group-append">
<span class="input-group-text">
<i class="mdi mdi-check-circle-outline"></i>
</span>
</div>
#error('password')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
#enderror
</div>
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary submit-btn btn-block">
{{ __('Login') }}
</button>
</div>
<div class="form-group d-flex justify-content-between">
<div class="form-check form-check-flat mt-0">
<label class="form-check-label">
<input class="form-check-input" type="checkbox" name="remember" id="remember"
{{ old('remember') ? 'checked' : '' }}> Keep me signed in
</label>
</div>
#if (Route::has('password.request'))
<a class="text-small forgot-password text-black"
href="{{ route('password.request') }}">
{{ __('Forgot Your Password?') }}
</a>
#endif
</div>
<div class="text-block text-center my-3">
<span class="text-small font-weight-semibold">Not a member ?</span>
Create new account
</div>
</form>
</div>
</div>
</div>
</div>
<!-- content-wrapper ends -->
</div>
<!-- page-body-wrapper ends -->
</div>
<!-- container-scroller -->
#endsection
register.blade.php
#extends('layouts.app')
#section('content')
<div class="container-scroller">
<div class="container-fluid page-body-wrapper full-page-wrapper">
<div class="content-wrapper d-flex align-items-center auth register-bg-1 theme-one">
<div class="row w-100">
<div class="col-lg-4 mx-auto">
<h2 class="text-center mb-4">{{ __('Register') }}</h2>
<div class="auto-form-wrapper">
<form method="POST" action="{{ route('register') }}">
#csrf
<div class="form-group">
<div class="input-group">
<input id="name" type="text"
class="form-control #error('name') is-invalid #enderror" name="name"
value="{{ old('name') }}" required autocomplete="name" autofocus
placeholder="Name">
<div class="input-group-append">
<span class="input-group-text">
<i class="mdi mdi-check-circle-outline"></i>
</span>
</div>
#error('name')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
#enderror
</div>
</div>
<div class="form-group">
<div class="input-group">
<input id="email" type="email"
class="form-control #error('email') is-invalid #enderror" name="email"
value="{{ old('email') }}" required autocomplete="email" placeholder="Email">
<div class="input-group-append">
<span class="input-group-text">
<i class="mdi mdi-check-circle-outline"></i>
</span>
</div>
#error('email')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
#enderror
</div>
</div>
<div class="form-group">
<div class="input-group">
<input id="password" type="password"
class="form-control #error('password') is-invalid #enderror" name="password"
required autocomplete="new-password" placeholder="**********">
<div class="input-group-append">
<span class="input-group-text">
<i class="mdi mdi-check-circle-outline"></i>
</span>
</div>
#error('password')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
#enderror
</div>
</div>
<div class="form-group">
<div class="input-group">
<input id="password-confirm" type="password" class="form-control"
name="password_confirmation" required autocomplete="new-password"
placeholder="**********">
<div class="input-group-append">
<span class="input-group-text">
<i class="mdi mdi-check-circle-outline"></i>
</span>
</div>
</div>
</div>
<div class="form-group d-flex justify-content-center">
<div class="form-check form-check-flat mt-0">
<label class="form-check-label">
<input type="checkbox" class="form-check-input" checked> I agree to the terms
</label>
</div>
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary submit-btn btn-block">
{{ __('Register') }}
</button>
</div>
<div class="text-block text-center my-3">
<span class="text-small font-weight-semibold">Already have and account ?</span>
{{ __('Login') }}
</div>
</form>
</div>
</div>
</div>
</div>
<!-- content-wrapper ends -->
</div>
<!-- page-body-wrapper ends -->
</div>
<!-- container-scroller -->
#endsection
css file asset/css/demo_1/style.css you guys see from here
https://github.com/sgwebfreelancer/laravel_auth_tutorial/blob/main/public/assets/css/demo_1/style.css
layouts/app.blade.php file you guys can see from here
https://github.com/sgwebfreelancer/laravel_auth_tutorial/blob/main/resources/views/layouts/app.blade.php
in my console, i saw my css not load it.

In layouts.app, line 15, you have to change :
href="{{ asset('public/assets/css/shared/style.css')
to
href="{{ asset('/assets/css/shared/style.css')

Related

Modal Uncaught TypeError: Illegal invocation

I'm developing a laravel project. After logging in with modal, I tried to register with modal, but I encountered an error. I'm waiting for your help. I WILL SHARE THE SEAMLESS PART AT THE BOTTOM
I don't know why this is so. I have no problem with login. However, I am having a problem with the registration part. I did some research on modal but couldn't solve the problem
Error:
register modal
<div class="modal fade" id="modal--register-kayit" tabindex="-1" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-contentt">
<!-- <div class="modal-header">
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div> -->
<body class="login">
<section class="login">
<div class="container-login">
<div class="form-login">
<button type="button" class="btn-closee" data-bs-dismiss="modal" aria-label="Close"></button>
<h2 class="login" >
<a href="{{ url('/') }}" style="text-decoration:none; margin-left: 50px;">
{{ $site_name }}
</a>
</h2>
<form class="form-login" action="{{ route('register) }}" method="post">
{{ csrf_field() }}
<div>
<div class="inputBx">
<input id="name" type="text" class="login #error('name') is-invalid #enderror" name="name" value="{{ old('name') }}" required autocomplete="name">
<span class="login">{{ __('Kullanıcı Adı') }}</span>
#if($errors->has('name'))
<script>
$(document).ready(function() {
$('#modal--register--kayit').modal('show');
});
</script>
<span class="invalid-feedback" role="alert">
<strong>{{ $errors->first('name') }}</strong>
</span>
#endif
<i class="fas fa-user-circle"></i>
</div>
<div class="inputBx">
<input id="email" type="email" class="login #error('email') is-invalid #enderror" name="email" value="{{ old('email') }}" required autocomplete="email">
<span class="login">{{ __('Email') }}</span>
#error('email')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
#enderror
<i class="fas fa-envelope"></i>
</div>
<div class="inputBx password">
<input id="password" type="password" class="login #error('password') is-invalid #enderror" name="password" required autocomplete="current-password">
<i class="fas fa-key"></i>
<span class="login">Şifre</span>
#error('password')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
#enderror
</div>
<div class="inputBx password">
<input id="password-confirm" type="password" class="login" name="password_confirmation" required autocomplete="off">
<i class="fas fa-key"></i>
<span class="login">{{ __('auth.confirm_password') }}</span>
</div>
<form action="#" onsubmit="
if(document.getElementById('agree').checked) {
return true;
} else {
alert('Lütfen Şartlar ile Gizlilik Politikasını okuyup kabul ettiğinizi belirtin.'); return false; }">
<input class="login" type="checkbox" required name="checkbox" value="check" id="agree" /> Okudum ve onaylıyorum <br> Şartlar ve Politikalar
</form>
<!--
<div class="mb-3">
<label class="form-check">
<input type="checkbox" class="form-check-input">
<span class="form-check-label">Agree the .</span>
</label>
</div>
-->
{!! NoCaptcha::display() !!}
<span class="" role="alert">
<strong style="color: red;">#error('g-recaptcha-response') {{ $message}} #enderror</strong>
</span>
<div class="inputBx">
<input type="submit" value="{{ __('Yeni Hesap Oluştur') }}" class="login" style="max-width: 180px;">
</div>
</form>
#if (Route::has('password.request'))
<p class="login">Şifreni mi Unuttun?
<a class="login" href="{{ route('password.request') }}">
Sıfırlamak için tıkla!
</a>
</p>
#endif
<p class="login">Henüz bir hesabınız yok mu? <a class="login" href="{{ url('register') }}">Kayıt Ol</a></p>
</div>
</div>
</section>
</body>
</div>
</div>
</div>
Where I call Modal
<a href="#" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#modal--register--kayit">
{{ __('auth.register') }}
</a>
SEAMLESS ENTRY MODAL
<div class="modal fade" id="modal--login--giris" tabindex="-1" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-contentt">
<!-- <div class="modal-header">
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div> -->
<body class="login">
<section class="login">
<div class="container-login">
<div class="form-login">
<button type="button" class="btn-closee" data-bs-dismiss="modal" aria-label="Close"></button>
<h2 class="login" >
<a href="{{ url('/') }}" style="text-decoration:none; margin-left: 50px;">
{{ $site_name }}
</a>
</h2>
<form method="POST" action="{{ route('login') }}" class="form-login">
{{ csrf_field() }}
<div class="inputBx">
<input id="email" type="email" class="login #error('email') is-invalid #enderror" name="email" value="{{ old('email') }}" required autocomplete="email">
<span class="login">{{ __('Kullanıcı Adı') }}</span>
#error('email')
<script>
$(document).ready(function() {
$('#modal--login--giris').modal('show');
});
</script>
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
#enderror
<i class="fas fa-user-circle"></i>
</div>
<div class="inputBx password">
<input id="password" type="password" class="login #error('password') is-invalid #enderror" name="password" required autocomplete="current-password">
<p href="#" class="password-control login" onclick="return show_hide_password(this);"> </p>
<i class="fas fa-key"></i>
<span class="login">Şifre</span>
#error('password')
<script>
$(document).ready(function() {
$('#modal--login--giris').modal('show');
});
</script>
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
#enderror
</div>
<label class="remember">
<input type="checkbox" class="login form-check-input remember" name="remember" id="remember" {{ old('remember') ? 'checked' : '' }}> {{ __('Beni Hatırla') }}
</label>
{!! NoCaptcha::display() !!}
#error('g-recaptcha-response')
<script>
$(document).ready(function() {
$('#modal--login--giris').modal('show');
});
</script>
<span class="" role="alert">
<strong style="color: red;">Lütfen Robot Olmadığınızı Kanıtlayın.</strong>
</span>
#enderror
<div class="inputBx">
<!-- <button type="submit" name="submit" value="Log in">{{ __('Giriş Yap') }}</button>-->
<input type="submit" value="{{ __('Giriş Yap') }}" class="login">
</div>
</form>
#if (Route::has('password.request'))
<p class="login">Şifreni mi Unuttun?
<a class="login" href="{{ route('password.request') }}">
Sıfırlamak için tıkla!
</a>
</p>
#endif
<p class="login">Henüz bir hesabınız yok mu? Kayıt Ol</p>
</div>
</div>
</section>
</body>
</div>
</div>
</div>

laravel Error 419 PAGE EXPIRED Sorry, your session has expired. Please refresh and try again

I have tried to try login into my system. but I got always the same error. The full website is run goods but when I try to login then shows the problem "Error 419 PAGE EXPIRED Sorry, your session has expired. Please refresh and try again". my website link is https://atozwp.xyz
My login form Code is here-
<form class="ui large form" action="{{ route('login', ['redirect' => request()->redirect ?? '/']) }}" method="post">
#csrf
<div class="field">
<label>Email</label>
<input type="email" placeholder="..." name="email" value="{{ old('email', session('email')) }}" required autocomplete="email" autofocus>
#error('email')
<div class="ui negative message">
<strong>{{ $message }}</strong>
</div>
#enderror
</div>
<div class="field">
<label>{{ __('Password') }}</label>
<input type="password" placeholder="..." name="password" required autocomplete="current-password">
#error('password')
<div class="ui negative message">
<strong>{{ $message }}</strong>
</div>
#enderror
</div>
<div class="field">
<div class="ui checkbox">
<input type="checkbox" name="remember" id="remember">
<label class="checkbox" for="remember">{{ __('Remember me') }}</label>
</div>
</div>
#error('captcha')
<div class="ui negative message">
<strong>{{ $message }}</strong>
</div>
#enderror
#error('g-recaptcha-response')
<div class="ui negative message">
<strong>{{ $message }}</strong>
</div>
#enderror
#if(captcha_is_enabled('login'))
<div class="field d-flex justify-content-center">
{!! render_captcha() !!}
#if(captcha_is('mewebstudio'))
<input type="text" name="captcha" value="{{ old('captcha') }}" class="ml-1">
#endif
</div>
#endif
<div class="field mb-0">
<button class="ui yellow large fluid circular button" type="submit">{{ __('Login') }}</button>
</div>
<div class="field">
<div class="ui text menu my-0">
<a class="item right aligned" href="{{ route('password.request') }}">{{ __('Forgot password') }}</a>
</div>
</div>
</form>

Laravel Login route not working - submit button doesn't work

I am implementing authentication in my Laravel application, the register and logout routes are working perfectly fine, but the login form is not working. I'm not getting any error, but when I click the logi button it doesn't go anywhere.
Here is my login.blade.php :
#extends('layouts.app')
#section('title', 'Login')
#section('content')
<form class="form-horizontal form-material" id="loginform" method="POST" action="{{ route('login') }}>
#csrf
<h3 class="text-center m-b-20">Sign In</h3>
<div class="form-group ">
<div class="col-xs-12">
<input required="" id="email" type="email" class="form-control{{ $errors->has('email') ? ' is-invalid' : '' }}" placeholder="Enter your Email" name="email" value="{{ old('email') }}" required autofocus> </div>
#if ($errors->has('email'))
<span class="invalid-feedback" role="alert">
<strong>{{ $errors->first('email') }}</strong>
</span>
#endif
</div>
<div class="form-group">
<div class="col-xs-12">
<input id="password" type="password" class="form-control{{ $errors->has('password') ? ' is-invalid' : '' }}" name="password" placeholder="Enter your Password" required>
#if ($errors->has('password'))
<span class="invalid-feedback" role="alert">
<strong>{{ $errors->first('password') }}</strong>
</span>
#endif
</div>
</div>
<div class="form-group row">
<div class="col-md-12">
<div class="d-flex no-block align-items-center">
<div class="custom-control custom-checkbox">
<input class="form-check-input" type="checkbox" name="remember" id="remember" {{ old('remember') ? 'checked' : '' }}>
<label class="form-check-label" for="remember">
{{ __('Remember Me') }}
</label>
</div>
<div class="ml-auto">
<i class="fas fa-lock m-r-5"></i>{{ __('Forgot Your Password?') }}
</div>
</div>
</div>
</div>
<div class="form-group text-center">
<div class="col-xs-12 p-b-20">
<button class="btn btn-block btn-info btn-rounded" type="submit">{{ __('Login') }}</button>
</div>
</div>
<div class="form-group m-b-0">
<div class="col-sm-12 text-center">
Don't have an account? <b>Sign Up</b>
</div>
</div>
</form>
#endsection
These are my login routes:
$this->get('admin/login', 'Auth\LoginController#showLoginForm')->name('login');
$this->post('admin/login', 'Auth\LoginController#login');
Does anyone know where I messed up?
You can try implementing the standard auth routing wrapped in a prefix to give you want you want:
Route::group(['prefix' => 'admin'], function () {
Auth::routes();
});
That way you do not have to worry about the route names being different from the docs :)

Csrf form verification laravel error

when doing my laravel inscription form it work totally fine, suddenly i have an error with csrf verification form after adding verification email inscription controller, here is the error message:
TokenMismatchException in VerifyCsrfToken.php line 67:
Despite i put it in my forme like this:
#extends('index')
#section('content')
<div class="container">
</br>
<div class="row">
<div class="media service-box wow fadeInRight">
<div class="panel-heading">Insription</div>
<div class="panel-body">
<form id="form_inscription" name="form_inscription" class=" form-horizontal" role="form" method="POST" action="{{ url('/register') }}" onSubmit="return validate(this);">
{{ csrf_field() }}
<div class="form-group{{ $errors->has('name') ? ' has-error' : '' }} has-feedback">
<label for="name" class="col-md-4 control-label">*Nom</label>
<div class="col-md-4 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
<input id="name" type="text" class="form-control" name="name" value="{{ old('name') }}" required >
</div>
#if ($errors->has('name'))
<span class="help-block">
<strong>{{ $errors->first('name') }}</strong>
</span>
#endif
</div>
</div>
<div class="form-group {{ $errors->has('prenom') ? ' has-error' : '' }} has-feedback">
<label class="col-md-4 control-label">*Prénom</label>
<div class="col-md-4 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
<input type="text" name="prenom" id="prenom" class="form-control" maxlength="30" value="{{ old('prenom') }}" required>
</div>
#if ($errors->has('prenom'))
<span class="help-block">
<strong>{{ $errors->first('prenom') }}</strong>
</span>
#endif
</div>
</div>
<div class="form-group {{ $errors->has('civilite') ? ' has-error' : '' }} has-feedback">
<label class="col-md-4 control-label">*Civilité</label>
<div class="col-md-4 inputGroupContainer">
<div class="input-group">
<div style="float:left;margin-right:20%">
<label><input type="radio" name="civilite" id="civilite" class="form-control" style="height:20px;" value="1" data-bv-field="Type_Client" value="{{ old('civilite') }}" required>Entreprise
</label>
</div>
#if ($errors->has('civilite'))
<span class="help-block">
<strong>{{ $errors->first('civilite') }}</strong>
</span>
#endif
<div style="float:left">
<label><input type="radio" name="Type_Client" id="Type_Client" class="form-control" style="height:20px;" disabled="disabled" value="0" data-bv-field="Type_Client" value="{{ old('civilite') }}"><i class="form-control-feedback" data-bv-icon-for="Type_Client" style="display: none;"></i>Particulier</label>
</div>
</div>
</div>
</div>
<div class="form-group {{ $errors->has('adresse') ? ' has-error' : '' }} has-feedback">
<label class="col-md-4 control-label">*Adresse</label>
<div class="col-md-4 selectContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-map-marker"></i></span>
<input type="text" name="adresse" id="adresse" class="form-control" maxlength="120" autocomplete="off" data-bv-field="Adresse" value="{{ old('adresse') }}" required><i class="form-control-feedback" data-bv-icon-for="Adresse" style="display: none;"></i>
</div>
#if ($errors->has('adresse'))
<span class="help-block">
<strong>{{ $errors->first('adresse') }}</strong>
</span>
#endif
</div>
</div>
<div class="form-group {{ $errors->has('ville') ? ' has-error' : '' }} has-feedback">
<label class="col-md-4 control-label">*Ville</label>
<div class="col-md-4 selectContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-home"></i></span>
<input type="text" name="ville" id="ville" class="form-control" maxlength="50" autocomplete="off" data-bv-field="Ville" value="{{ old('ville') }}" required ><i class="form-control-feedback" data-bv-icon-for="Ville" style="display: none;"></i>
</div>
#if ($errors->has('ville'))
<span class="help-block">
<strong>{{ $errors->first('ville') }}</strong>
</span>
#endif
</div>
</div>
<div class="form-group {{ $errors->has('wilaya') ? ' has-error' : '' }} has-feedback">
<label class="col-md-4 control-label">*Téléphone FixeWilaya</label>
<div class="col-md-4 selectContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-list"></i></span>
<select name="wilaya" id="wilaya" class="form-control selectpicker" data-bv-field="wilaya"><option value="{{ old('wilaya') }}">Sélectionner une Wilaya</option><option value="1">Adrar</option><option value="2">Chlef</option><option value="3">Laghouat</option><option value="4">Oum El-Bouaghi</option><option value="5">Batna</option><option value="6">Bejaia</option><option value="7">Biskra</option><option value="8">Bechar</option><option value="9">Blida</option><option value="10">Bouira</option><option value="11">Tamanrassat</option><option value="12">Tebessa</option><option value="13">Tlemcen</option><option value="14">Tiaret</option><option value="15">Tizi-Ouzou</option><option value="16">Alger</option><option value="17">Djelfa</option><option value="18">Jijel</option><option value="19">Setif</option><option value="20">Saida</option><option value="21">Skikda</option><option value="22">Sidi-Bel-Abbes</option><option value="23">Annaba</option><option value="24">Guelma</option><option value="25">Constantine</option><option value="26">Médea</option><option value="27">Mostaganem</option><option value="28">M'sila</option><option value="29">Mascara</option><option value="30">Ouargla</option><option value="31">Oran</option><option value="32">El-Bayadh</option><option value="33">Illizi</option><option value="34">Bordj Bou-Arreridj</option><option value="35">Boumerdes</option><option value="36">El-Taref</option><option value="37">Tindouf</option><option value="38">Tissimsilt</option><option value="39">El-Oued</option><option value="40">khenchela</option><option value="41">Souk Ahras</option><option value="42">Tipaza</option><option value="43">Mila</option><option value="44">Ain Defla</option><option value="45">Naama</option><option value="46">Ain Timouchent</option><option value="47">Ghardaia</option><option value="48">Relizane</option></select><i class="form-control-feedback" data-bv-icon-for="Wilaya" style="display: none;"></i></div><small data-bv-validator="notEmpty" data-bv-validator-for="Wilaya" class="help-block" style="display: none;">Veuillez choisir votre Wilaya</small>
#if ($errors->has('wilaya'))
<span class="help-block">
<strong>{{ $errors->first('wilaya') }}</strong>
</span>
#endif
</div>
</div>
<div class="form-group {{ $errors->has('tel_mobile') ? ' has-error' : '' }} has-feedback">
<label class="col-md-4 control-label">*Mobile</label>
<div class="col-md-4 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-earphone"></i></span>
<input id="tel_mobile" name="tel_mobile" class="form-control" maxlength="10" required >
</div>
#if ($errors->has('tel_mobile'))
<span class="help-block">
<strong>{{ $errors->first('tel_mobile') }}</strong>
</span>
#endif
</div>
</div>
<div class="form-group {{ $errors->has('tel_fix') ? ' has-error' : '' }} has-feedback">
<label class="col-md-4 control-label">*Téléphone Fixe</label>
<div class="col-md-4 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-earphone"></i></span>
<input name="tel_fix" id="tel_fix" class="form-control" maxlength="9" autocomplete="off" data-bv-field="Fixe" value="{{ old('tel_fix') }}" required><i class="form-control-feedback" data-bv-icon-for="Fixe" style="display: none;"></i>
</div>
#if ($errors->has('tel_fix'))
<span class="help-block">
<strong>{{ $errors->first('tel_fix') }}</strong>
</span>
#endif
</div>
</div>
<div class="form-group {{ $errors->has('email') ? ' has-error' : '' }} has-feedback">
<label for="email" class="col-md-4 control-label">E-Mail Address</label>
<div class="col-md-4 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon fa fa-at"></i>
</span>
<input id="email" type="email" class="form-control" required name="email" value="{{ old('email') }}">
</div>
#if ($errors->has('email'))
<span class="help-block">
<strong>{{ $errors->first('email') }}</strong>
</span>
#endif
</div>
</div>
<div class="form-group has-feedback">
<label class="col-md-4 control-label">* Confirmer votre E-Mail</label>
<div class="col-md-4 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon fa fa-at"></i>
</span>
<input type="email" name="Email2" id="Email2" class="form-control" maxlength="50" autocomplete="off" data-bv-field="Email2" required><i class="form-control-feedback" data-bv-icon-for="Email2" style="display: none;"></i>
</div>
<small data-bv-validator="notEmpty" data-bv-validator-for="Email2" class="help-block" style="display: none;">Veuillez retaper votre adresse Email</small><small data-bv-validator="emailAddress" data-bv-validator-for="Email2" class="help-block" style="display: none;">Veuillez saisir une adresse Email valide</small><small data-bv-validator="identical" data-bv-validator-for="Email2" class="help-block" style="display: none;">votre adresse Email n'est pas identique</small><small data-bv-validator="stringLength" data-bv-validator-for="Email2" class="help-block" style="display: none;">valeur non valide
</small>
</div>
</div>
<script>
document.getElementById("Email2").onpaste = function () {
alert("Merci de ne pas copier/coller"); // on prévient
return false; // on empêche
}
</script>
<div class="form-group {{ $errors->has('compte_banquaire') ? ' has-error' : '' }} has-feedback">
<label class="col-md-4 control-label">*Code Postale</label>
<div class="col-md-4 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-eur"></i></span>
<input type="text" name="compte_banquaire" id="compte_banquaire" class="form-control" maxlength="5" data-bv-field="Code_Postal" value="{{ old('compte_banquaire') }}" required><i class="form-control-feedback" data-bv-icon-for="Code_Postal" style="display: none;"></i>
</div>
#if ($errors->has('compte_banquaire'))
<span class="help-block">
<strong>{{ $errors->first('compte_banquaire') }}</strong>
</span>
#endif
</div>
</div>
<div class="form-group {{ $errors->has('organisation') ? ' has-error' : '' }} has-feedback">
<label class="col-md-4 control-label">*Organisation</label>
<div class="col-md-4 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-registration-mark"></i></span>
<input type="text" name="organisation" id="organisation" class="form-control" maxlength="20" data-bv-field="Organisation" value="{{ old('organisation') }}" required>
</div>
#if ($errors->has('organisation'))
<span class="help-block">
<strong>{{ $errors->first('organisation') }}</strong>
</span>
#endif
</div>
</div>
<div class="form-group{{ $errors->has('password') ? ' has-error' : '' }} has-feedback">
<label for="password" class="col-md-4 control-label"> *Mot de pass</label>
<div class="col-md-4 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
<input id="password" type="password" class="form-control" name="password" required>
</div>
#if ($errors->has('password'))
<span class="help-block">
<strong>{{ $errors->first('password') }}</strong>
</span>
#endif
</div>
</div>
<div class="form-group{{ $errors->has('password_confirmation') ? ' has-error' : '' }} has-feedback">
<label for="password-confirm" class="col-md-4 control-label">*Confirmer mot de pass</label>
<div class="col-md-4 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-lock"></i></span>
<input id="password-confirm" type="password" class="form-control" name="password_confirmation" required>
</div>
#if ($errors->has('password_confirmation'))
<span class="help-block">
<strong>{{ $errors->first('password_confirmation') }}</strong>
</span>
#endif
</div>
</div>
<div class="form-group">
<div class="col-md-6 col-md-offset-4">
<button type="submit" class="btn btn-primary">
<i class="fa fa-btn fa-user"></i> Creer compte
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
#endsection
Thank You for helping me.
Try this code
Replace
{{ csrf_field() }}
this one
<input type="hidden" name="_token" value="{{ csrf_token() }}">
or
<input type="hidden" name="_token" id="token" value="<?php echo csrf_token(); ?>">
Try
{!! csrf_field() !!} instead of {{ csrf_field() }}
checkout my answer here that user was also facing the same issue and the solution worked for him.

login auth didn't work onlie in laravel

I'm trying to make login and register at my laravel website , and i have been used the laravel make auth , it's working very good at local host but when i have uploaded it it's not . It doesn't read the auth name or anything just it's regsiter new user but can't login or show the error message or anything.
please i need help ? and here's my register blade
#extends('layouts.app')
#section('content')
<!-- Modal Signup -->
<div class="modal fade style-base-modal" id="modal-signup" tabindex="-1" role="dialog" aria-hidden="true" aria-labelledby="modalSignupLabel">
<div class="modal-dialog">
<div class="modal-content">
<div class="inner-container clearfix">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">
<i class="fa fa-times"></i>
</span>
</button>
<h4 class="modal-title email-icon" id="modalSignupLabel">#lang('messages.Create-your-Account')</h4>
</div>
<div class="modal-body clearfix">
<div class="col-md-7 no-padding">
<form accept-charset="UTF-8" class="form-style-base" role="form" method="POST" action="{{ url('/register') }}">
{{ csrf_field() }}
<div class="form-group no-bottom-border no-padding form-group-style-sign {{ $errors->has('name') ? ' has-error' : '' }}">
<input type="text" class="form-control input-lg form-control-style-sign" placeholder="#lang('messages.UserName')" name="name" value="{{ old('name') }}"/>
#if ($errors->has('name'))
<span class="help-block">
<strong>{{ $errors->first('name') }}</strong>
</span>
#endif
</div>
<div class="form-group no-bottom-border no-padding form-group-style-sign {{ $errors->has('email') ? ' has-error' : '' }}">
<input type="email" class="form-control input-lg form-control-style-sign" placeholder="#lang('messages.Email')" name="email" value="{{ old('email') }}" />
#if ($errors->has('email'))
<span class="help-block">
<strong>{{ $errors->first('email') }}</strong>
</span>
#endif
</div>
<div class="form-group no-bottom-border no-padding form-group-style-sign {{ $errors->has('password') ? ' has-error' : '' }}">
<input type="password" class="form-control input-lg form-control-style-sign" placeholder="#lang('messages.Password')" name="password">
#if ($errors->has('password'))
<span class="help-block">
<strong>{{ $errors->first('password') }}</strong>
</span>
#endif
</div>
<div class="form-group no-bottom-border no-padding form-group-style-sign {{ $errors->has('password_confirmation') ? ' has-error' : '' }}">
<input type="password" class="form-control input-lg form-control-style-sign" placeholder="#lang('messages.Re-password')" name="password_confirmation">
#if ($errors->has('password_confirmation'))
<span class="help-block">
<strong>{{ $errors->first('password_confirmation') }}</strong>
</span>
#endif
</div>
<div class="required-fields text-right spacer-bottom-5">
*#lang('messages.Required-fields')
</div>
<div>
<!-- <div class="checkbox">
<label class="btn-link small">
<input type="checkbox" name="Iscriviti" value="1" /> Subscribe to the newsletter
</label>
</div>-->
<!-- <div class="checkbox">
<label class="btn-link small">
<input type="checkbox" name="privacy" value="1" /> I agree to the policies of the <a class="btn-link" href="#">privacy</a>
</label>
</div> -->
</div>
<div>
<button type="submit" class="btn btn-warning btn-lg btn-block">
<i class="fa fa-user"></i> #lang('messages.create-account')
</button>
</div>
<!--<p class="text-center small no-margin">
<label class="member-label">Already are you member? </label><a class="btn-link" href="signin.html">Sign in</a>
</p>-->
</form> </div>
<div class="col-md-5 spacer-30">
<div class="text-center">
<h4 class="no-margin-top social-sign">
#lang('messages.socialnetwork')<br>#lang('messages.accountSignin')
</h4>
<div class="socials btn-group clearfix">
<a class="btn-social btn-facebook " href="redirect"> <i class="fa fa-facebook fa-1x"></i> </a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- end sign up -->
#endsection
Do you see any error message on storage/logs/laravel.log file?

Categories