Category : laravel-7

I have error 419 | Page Expired when i login in my website, i alrady use @csrf in my form. what can i do to fix this problem ? this is my login.php file @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">{{ __(‘Login’) }}</div> <div class="card-body"> <form method="POST" action="{{ route(‘login’) ..

Read more

I’m trying to return query data and storage Images from laravel controller. My code looks like following : class ClaimController extends Controller{ ….. public function show(Claim $claim) { $front_image = Storage::disk(‘do_spaces’)->get($claim->images->front_image); //image file $back_image = Storage::disk(‘do_spaces’)->get($claim->images->back_image); //image // return $front_image [works] $claim = Claim::all(); //this throws error return response()->json([ ‘claim’ => $claim, ‘images’ => [$front_image, ..

Read more

I am using Laravel 7 and I want to create an API auth0 middleware for my application. I used this auth0 guide: https://auth0.com/docs/quickstart/backend/laravel/01-authorization#define-permissions by I also found this one which is quite similar: https://auth0.com/blog/build-and-secure-laravel-api/ When I try to use the /api/private route (which uses the jwt mention middleware) I get the following error which drives ..

Read more

I am trying to connect database with my laravel 7 application but each time when I hit `php artisan migrate` I am getting the following errors. I have connected my .env file as below: DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=test DB_USERNAME=root DB_PASSWORD="" IlluminateDatabaseQueryException could not find driver (SQL: select * from information_schema.tables where table_schema = test and ..

Read more