laravel stored procedure migration syntax error when calling

I have stored procedure migration in laravel for mysql DB. This is the stored procedure: DROP PROCEDURE IF EXISTS `select_total_raised_jobs`; delimiter ;; CREATE PROCEDURE `select_total_raised_jobs` (IN cid int) BEGIN DROP TABLE IF EXISTS tmp_results; CREATE TEMPORARY TABLE tmp_results AS SELECT COUNT(jobs.id) AS TotalJobs, DATE(jobs.created_at) AS created_at, users.id AS userID, concat( users.first_name,’ ‘,users.last_name) as full_name, jobs.driver_id…

Laravel validation required_if is not working

I have the email and password fields in which I only want them to be required if the add_user field value is 1. This is my validation: public function rules() { return [ ‘add_user’ => [‘required’], ‘password’ => [‘required_if:add_user,1’, ‘min:8′], ’email’ => [‘required_if:add_user,1′, ’email’, ‘max:255’], ]; } This one is not working, it always errors…

Laravel pass param url id to controller function

I have a page with data/information on it with a download button that converts my page to pdf. Now, the download button is my problem with how I can do it. My current page URL. Route::get(‘/inventory/{id}’, function ($id) { $inventory = Inventory::find($id); return view(‘layouts._inventory-template’, [‘inventory’ => $inventory]) }); My button in the view <a href=””…