Error in laravel how clear this division by zero

here is the code with division by zero in laravel $multi_cotas = Variavel::where(‘ativo’, true)->first()->multi_cotas; $f_saldo_cotas = Fabrica::all()->first()->saldo_cotas; $num_cotas = 0; $graduacoes = Graduacao::all(); foreach ($graduacoes as $graduacao) { $num_cotas += $graduacao->total_cotas_qualificados; } $num_cotas = $num_cotas * $multi_cotas; $valor_cota = $f_saldo_cotas / $num_cotas; $planos = Plano::where(‘ativo’, true)->get(); return view(‘dashboard.user-dashboard’, compact(‘planos’, ‘valor_cota’));

Correct Implementation of Proxy Server using Laravel Scout, Algolia and GuzzleHttp

I am trying to implement usage of a proxy server on my application which is running on Lumen w/ Laravel Scout and Algolia for the search. I am unable to modify and integrate the snippet provided by Algolia: https://www.algolia.com/doc/api-client/advanced/pass-options-to-the-http-client/php/?language=php#using-the-default-guzzle6httpclient-recommended Any hints on what the correct usage of the supplied code would be greatly appreciated! use…

Laravel Vue Axios – Axios DELETE Request becomes GET Request

I’m getting a particular error and can’t understand where the problem is. No more explanations, code will illustrate it better than me : Here are my routes : Route::get(‘/’, ‘HomeController@index’)->name(‘home’); Route::delete(‘home/{home}’, ‘HomeController@destroy’)->name(‘home.destroy’); Here is my homeController : class HomeController extends Controller { public function index() { return view(‘view’); } public function destroy() { dd(‘Hello World’);…

Get city value based on user_id from database Laravel

I need to get the value from the table – privacy_settings, column – city, based on user_id which is on my view from table users, column id. Here is my controller : public function findUser($role = null,$search = null,$name = null,$country = null,$city = null,$industry = null,$department = null,$function_name = null,$timeframe =null,$language_skills = null,$organization_type =…