skip to Main Content

How can I shorten Laravel API response time?

I was pulling the data this way, but when I query with Postman, it takes too long to get the response. public function getAllItems(Request $request) { $type = $request->input('type'); $query = Item::query(); if ($type === 'series') { $query->where('is_series', true); }…

VIEW QUESTION

Laravel – Resource Controller in edit not having data

my link to edit <a href="/dashboard/rejected/{{ $reject->id }}/edit" class="badge bg-danger">{{ $reject->status }}</a> my route Route::resource('/dashboard/rejected', RejectController::class); my controller public function edit(Reject $reject) { dd($reject); return view('dashboard.reject.edit',[ 'tittle' => 'Reject Stock', 'reject' => $reject ]); } $reject on my controller is…

VIEW QUESTION

Laravel Service Container Binding Primitives Not Working For Mailchimp

We have the following binding Primitives use NZTimMailchimpMailchimp; use ReCaptchaReCaptcha; class AppServiceProvider extends ServiceProvider { /** * Register any application services. */ public function register(): void { app()->when(Mailchimp::class) ->needs('$apikey') ->give(config('services.mailchimp.apikey')); app()->when(ReCaptcha::class) ->needs('$secret') ->give(config('services.recaptcha.secret')); } } Recaptcha is working. But with…

VIEW QUESTION

Laravel Eloquent add a WHERE xy IS NULL condition

I use Laravel 10. I try to fetch some data from my mariaDB with the following condition. $contentList = $this->get(); foreach($contentList as $content){ $this->product()->where('id', '=', $content->content_product_id)->ddRawSql(); } But the query I get is: select * from `radio_content_products` where `radio_content_products`.`id` is…

VIEW QUESTION
Back To Top
Search