I am doing email verification while user registration in laravel-8. i have set below codes in routes as per docs https://laravel.com/docs/8.x/verification#the-email-verification-handler sending verification email working fine but when click on verification link that it give me an error that EmailVerificationRequest class does not exist. use IlluminateHttpRequest; use IlluminateFoundationAuthEmailVerificationRequest; Route::get(‘/email/verify/{id}/{hash}’, function (EmailVerificationRequest $request) { $request->fulfill(); return ..

Read more

I’m working with Laravel 5.8 and in this project, I want to insert a session value into the DB: if(session(‘video-products’)){ UserVideo::create([ ‘user_id’ => auth()->user()->usr_id, ‘product_id’ => session(‘video-products’), ‘order_id’ => $orderId, ]); } But it does not work out and inserts nothing. And when I dd(session(‘video-products’)), I get this: array:1 [▼ 0 => 33 ] And ..

Read more

i have to retry data from this app, OnWebChange.it asks me the callback url. HTTP POST Callback URL http://127.0.0.1:8000/my/page The following table details the additional parameters that OnWebChange will append to the callback URL: Parameter name Description femtoo_callback_url The URL being tracked femtoo_callback_data The new tracker content concatenated to the first 2500 characters femtoo_callback_label The ..

Read more

i’m having a Clinic(id,name,&services from service class on it ) and when i need to store my services on database it saved normally but with an empty array without my services data here is my view <form class="form-horizontal" wire:submit.prevent="storeClinic"> <div class="form-group"> <label class="col-md-4 control-label">اسم العيادة</label> <div class="col-md-4"> <input type="text" placeholder="اسم العيادة" id="name" name="name" class="form-control input-md" ..

Read more

So this query works beautifully: Post::where(‘id’, $id) ->with([ ‘comments’ => function($query) { $query->where(‘marked_as’, ‘active’); }, ]) ->withCount([ ‘comments as comments_active_count’ => function ($q) { $q->where(‘comments.marked_as’, ‘active’); }, ‘comments as comments_not_active_count’ => function ($q) { $q->where(‘comments.marked_as’, ‘not_active’); }, ]) ->firstOrFail(); But next to getting the count separately, I also like to get the comments collection separately ..

Read more

my controller public function showcart() { $da = isset($_COOKIE["cart"]) ? $_COOKIE["cart"] : "[]"; $data = json_decode($da); return view(‘customer.showcart’, compact(‘data’)); } blade: <tbody> @foreach ($data as $dat) <form action="{{ url(‘/addcart’) }}" method="post"> @csrf <tr> <td>{{ $dat[‘id’] }}</td> <td>{{ $dat[‘quantity’]}}</td> </tr> </form> @endforeach </tbody> current output {"id":["8","8","8","9","9","8","8","8","10"],"quantity":["3","2","3","3","2","1","2","1","6"]} I want to convert this in JSON with each of ..

Read more

my first database host in aws and secound database host in diedem server. and I want to reference one column from laravel_1.uesrs table to multiple other database server in employees table . Host: 192.168.0.100 Database:[laravel_1.uesrs]: https://i.stack.imgur.com/Tq5Mm.png CreateUsersTable Schema::create(‘users’, function (Blueprint $table) { $table->bigIncrements(‘id’); $table->string(‘name’); $table->string(’email’); } Host: 10.0.0.12 (different server) Database: [laravel_2.employees]: https://i.stack.imgur.com/QcLY5.png CreateEmployeesTable Schema::create(’employees’, ..

Read more

I added sanctum:auth middleware to the /graphql route in laravel. I keep getting 401 Unauthenticated on this route. I followed the steps in sanctum SPA authentification guide Everything works without that middleware on the route, but I don’t want to leave the api exposed without authentification. I tried with ssr=true and ssr=false nothing works. docker-compose.yaml ..

Read more

I’m trying to show a modal when I click the edit button, so I added wire:click : <td class="py-3 px-6 text-left"> <div class="flex items-center"> <span class="font-medium">{{ $project->project }}</span> </div> </td> <td class="py-3 px-6 text-left"> <div class="flex items-center"> <span>{{ $project->username }}</span> </div> </td> <td class="py-3 px-6 text-center"> <span class="bg-{{ $project->status_color }}-200 text-{{ $project->status_color }}-600 py-1 px-3 ..

Read more

i am trying to show a modal when i click the edit button so i added the wire:click : <td class="py-3 px-6 text-left"> <div class="flex items-center"> <span class="font-medium">{{ $project->project }}</span> </div> </td> <td class="py-3 px-6 text-left"> <div class="flex items-center"> <span>{{ $project->username }}</span> </div> </td> <td class="py-3 px-6 text-center"> <span class="bg-{{ $project->status_color }}-200 text-{{ $project->status_color }}-600 ..

Read more

We have a category selection function. Can you please help to suggest a filtering function that, when choosing a specific category, will pull up all blogs from this category by ID? JavaScript document.querySelectorAll(‘.category-filter_item’).forEach(el => { el.addEventListener(‘click’, () => { document .querySelector(‘.category-filter_item.active’) .classList.remove(‘active’); el.classList.add(‘active’); Development environment Laravel We have something like the following code on the ..

Read more

I’m experiencing the error: could not find driver (SQL: select * from sessions where id = Kz9rXIxivkq0sVfLu4ypMLQA3ePNZccHjsRZUhml limit 1) see image Migrations are running fine which is strange. Here is my php -m output: [PHP Modules] bz2 calendar Core ctype curl date dom exif fileinfo filter ftp gd gettext hash iconv json libxml mbstring mysqli ..

Read more

I have the following code in my app to upload image to imagekit. And i’m using this official package function uploadImage ($base64Img, $fileName, $folder, $h, $w, $aratio){ $imageKit = new ImageKit( “public_key, “private_key”, “urlEndpoint” ); $config = [ ‘file’ => $base64Img, //imageconverted to Base64 ‘fileName’ => $fileName, ‘folder’ => $folder, //foldername “transformation” => array( array( ..

Read more

how do I set the border for the active row only (not using range)? this is what i have tried so far public function registerEvents(): array { return [ AfterSheet::class => function (AfterSheet $event) { $event->sheet->getStyle(‘A1:J1’)->applyFromArray([ ‘font’ => [ ‘bold’ => true ], ‘alignment’ => [ ‘horizontal’ => PhpOfficePhpSpreadsheetStyleAlignment::HORIZONTAL_CENTER, ], ‘borders’ => [ ‘allBorders’ => ..

Read more

I’m making a multi-language website using Laravel 8. I have translated the words using {{ __(filexp.wordexp) }} and also having the lang/en file with the words translated. I have stuck at a function which uses {!! !!} function, and I want to translate the word inside the function. <x-jet-checkbox name="terms" id="terms"/> <div class="ml-2"> {!! __(‘By ..

Read more

I’m making some querries and receiving the $help_articles: [ { "id": 10, "title": "Creative Agency Creation", "sub_title": "Learn how to create creative agency and setup information and users", "featured_image": image.jpg", "content": "[{some content}]", }, { "id": 12, "title": "Create New User", "sub_title": "Instruction to create new user", "featured_image": "56095569_step_3.jpg", "content": "[{some_content}]", } ] Another querry ..

Read more