you want to force login ?
can you help me with this question?
Does somebody know?
And did you enabled it?
<?php
use IlluminateDatabaseSeeder;
class adminseed extends Seeder
{
public function run()
{
DB::table(‘users’)->updateOrInsert([
‘id’ =>’1′,
‘full_name’ => ‘Sysadmin’,
’email’ => ‘example@gmail.com’,
‘password’ => Hash::make(‘12345678’),
‘role_id’ => ‘3’,
‘img_path’ => ‘user-lg.jpg’,
]);
}
}
hello geek i use laravel version 7 and i want to redirect my login admin if i logout , i use handle from exception folder
namespace AppExceptions;
use Exception;
use IlluminateAuthAuthenticationException;
use IlluminateFoundationExceptionsHandler as ExceptionHandler;
class Handler extends ExceptionHandler
{
/
* A list of the exception types that should not be reported.
*
* @var array
*/
protected $dontReport = [
IlluminateAuthAuthenticationException::class,
IlluminateAuthAccessAuthorizationException::class,
SymfonyComponentHttpKernelExceptionHttpException::class,
IlluminateDatabaseEloquentModelNotFoundException::class,
IlluminateSessionTokenMismatchException::class,
IlluminateValidationValidationException::class,
];
/
* Report or log an exception.
*
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
*
* @param Exception $exception
* @return void
*/
public function report(Exception $exception)
{
parent::report($exception);
}
/
* Render an exception into an HTTP response.
*
* @param IlluminateHttpRequest $request
* @param Exception $exception
* @return IlluminateHttpResponse
*/
public function render($request, Exception $exception)
{
return parent::render($request, $exception);
}
/
* Convert an authentication exception into an unauthenticated response.
*
* @param IlluminateHttpRequest $request
* @param IlluminateAuthAuthenticationException $exception
* @return IlluminateHttpResponse
*/
protected function unauthenticated($request, AuthenticationException $exception)
{
if ($request->expectsJson()) {
return response()->json([‘error’ => ‘Unauthenticated.’], 401);
}
$guard = array_get($exception->guards(),0);
switch ($guard) {
case ‘admin’:
return redirect()->guest(route(‘admin.login’));
break;
default:
return redirect()->guest(route(‘login’));
break;
}
}
}
public function __construct()
{
$this->middleware(‘auth’);
}
and in your route something like :
Route::get(‘(your admin page route)’, [
‘middleware’ => ‘auth’,
‘uses’ => ‘AdminController@index’
]);
public function __construct()
{
$this->middleware(‘auth’);
}
and in your route something like :
Route::get(‘(your admin page route)’, [
‘middleware’ => ‘auth’,
‘uses’ => ‘AdminController@index’
]);
ok i have do it for any Controller like
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware(‘auth:admin’);
}

i get this page when i logout

what can i do for this case. please help me fix it
View log for more informaion
how

storage/logs/
Do anyone have book or source to learn from
Thnx
Do anyone have book or source to learn from
Thnx
Waste of time.. learn one of the most popular framework and be happy
Do anyone have book or source to learn from
Thnx
oop in php, find course in udemy

I thought it’ll be better for me to create one to improve my skills
Thank u
to improve your skills, you can use php quiz system, test your knowledge and when you fail, at least you will know what to improve 🙂
Do anyone have book or source to learn from
Thnx
U cAn watch this person vidoes https://www.youtube.com/user/JREAMdesign
Thanks, i appreciate it
and it means you also have a new laravel error

Does somebody know? Why artisan migrate don’t work? I’ve uncommented all exceptions but it didn’t help to me:(

not able to convert the image to base 64
Of course
Wait, I’m checking it
The error is obvious
what
And did you enabled it? And restart after enabling it
Filename cannot be empty