I am trying to run a python script within my laravel project using Symfony’s process component: https://symfony.com/doc/current/components/process.html My code is within a controller and looks like this: $process = new Process([ ‘python’, ‘–version’ ]);$process->run(); if(!$process->isSuccessful()) { throw new ProcessFailedException($process); } dd($process->getOutput()); The error I get is the following: The command "python –version" failed. Exit .. Read more I am using redis queue driver to run the jobs. Half of the jobs get failed to process. How to ensure that all the jobs get processed without failing. I have ensured that there is no any issue on code level. I have also setup the Laravel Horizon to monitor the jobs queues. Screenshot below. .. Read more I am trying to create a new contact using Xero oAuth 2.0 and getting this error: [401] Client error: PUT https://api.xero.com/api.xro/2.0/Contacts?summarizeErrors=true resulted in a 401 Unauthorized response: I have got my scopes as: ‘scopes’ => [ ‘openid’, ’email’, ‘profile’, ‘offline_access’, ‘accounting.settings’, ‘accounting.contacts’, ‘accounting.reports.read’, ], I am able to connect to get the message The App .. Read more I am trying to find an item by id, but my column is a comma separated string(primaryCategory in below screenshot). I want to get this field in my result when query by any string (i.e. by 50,20,41 etc). I know there could be options like whereIn, whereHas etc. but not able to find correct syntax. .. Read more I’m using Laravel with the plugin to create files in AWS S3 (league/flysystem-aws-s3-v3). I’m having an issue where: I have an API call with a method in a controller that receives an array of files. The method reads all the files and uploads them to S3. For some reason, if I send more than 20 .. Read more Model User: public function posts() { return$this->hasMany(‘AppModelsPost’); } Model Post: public function tags() { return $this->hasMany(‘AppModelsTag’); } In Controller:$user = User::with(‘posts’)->get($id); My collection should contain user > posts > tags & I’ve no idea how can I include tags inside posts object under user collection. Sourc.. Read more I have this JSON data when I saved. I have a total of 43 data inside this JSON. "{"question":["1","1","1","1","1","1","1","2","2","3","3","2","2","1","3","2","1","2","3","1","2","3","3","3","2","1","2","3","1","2","3","1","2","3","1","2","3","1","2","3","1","2","3"]} Then, I’m trying to calculate the score of this JSON data using this calculation. But it not calculate it because I did not get the JSON data value. I tried dd($survey_score) and it just totals up ..

Got a OOP theory question here, since i’m new to this kinda stuff, coming from mostly a JS flow. Let’s say i have a controller and method MyController::getAllData .It uses eloquent to fetch 2 different types of datasets that have almost no relations (and they shouldn’t). After fetching i need to go through a few ..

I am trying to get the records that haven’t been updated for over 5 hours where(‘updated_at’, ‘>=’, Carbon::now()->subHours(5))->get(); But it doesn’t seem I’m getting the correct results. Sourc..

I’ve problem, I’m trying to redirect users when they log in by role to their dashboard using middleware in laravel 6. But I’m stucked can’t figure out where is the problem in this condition. Please help, thanks kindly. Each role has this route web.php Route::group([ ‘as’=>’user.’, ‘prefix’=>’user’, ‘namespace’=>’User’, ‘middleware’=>[‘auth’,’user’]], function(){ Route::get(‘dashboard’, ‘[email protected]’)->name(‘dashboard’); }); Middleware looks ..

I am building an event reminder page where people can set a reminder for certain events. There is an option for the user to set the amount of time before they need to be notified. It is stored in notification_time and notification_unit. notification_time keeps track of the time before they want to be notified and ..

when I try to test using postman to lumen backend project it adds <? before the JSON result <? [] Sourc..

I made some modals in jQuery and they worked fine. Now I am trying to make those same modals but with VueJS. I followed their documentation for making a modal and it worked perfectly. But what I am trying to do is to have a fade on the overlay and a slideIn animation on the ..

I tried to get data from db having the particular id . The code is as follows : $obj = new Products();$res= $obj->select(‘*’)->where(‘track_id’,$trackId)->orderBy(‘shipping_date’, ‘desc’)->get(); But I am getting error as ‘Failed to load Response Data’. I have no idea why this error occurs. Someone please help me. Sourc..
In the blade I am using this code: <td>{{ $blog->content }}</td> but the output on the blade.php is unfortunately: <div>fascawds def ef edf&nbsp;<em>e df</em> dfg dfdx<strong>df&nbsp; dfxgfdgdf gefdger fdgerfd df&nbsp;</strong></div> How can I fix this? Sourc.. Read more How can I prevent a resource from being shown up using laravel observers ? I tried class PostObserver { public function retrieved(Post$post){ if($post->id==1) return false; } } but didnt work . Sourc.. Read more if I include the mathjax and mathjs files directly to my app.blade.php file everything works. <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/[email protected]/es5/tex-chtml.js"></script> <script src="{{asset(‘/js/math.min.js’)}}" type="text/javascript"></Script> <script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script> <script> MathJax = { tex: {inlineMath: [[‘$’, ‘$’], [‘(‘, ‘)’]]} }; </script> however if I do this the composer way : first I install the packages: composer require components/mathjs composer require .. Read more I have two tables in question: Users table which contains user’s balance column(casino_bakiye) Xpgtransactions table: Where I save transactions coming from the API. I also have a route /debit where debit requests are sent. In the request, there is amount and username among the data sent. So what I am to do Get the user .. Read more I’m inserting multiple data into the database. There is an error for my column report_by which is SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘report_by’ cannot be null (SQL: insert into ‘complaints’ (‘defect_id’, ‘image’, ‘description’, ‘report_by’) values (1, C:wamp64tmpphp8E2E.tmp, leak, ?)) Inside column report_by should be the id of the user by using Auth. users table .. Read more i accidently added some of storage files to my git repository that i want to remove them from local machine now but they have to remain on server . so what i did is cloning the project on my local machine and then added this line to my .gitignore : /storage/app/public/product and after that i .. Read more i am getting this error after i press save button in settings menu Error Name: ErrorException (E_WARNING) Creating default object from empty value Following error on line no.s ErrorException …/app/Http/Controllers/SettingController.php226 69 IlluminateFoundationBootstrapHandleExceptions handleError …/app/Http/Controllers/SettingController.php226 61 IlluminateRoutingPipeline IlluminateRouting{closure} …/app/Http/Middleware/IsAdmin.php30 58 IlluminateRoutingPipeline IlluminateRouting{closure} …/app/Http/Middleware/Localization.php21 24 IlluminateRoutingPipeline IlluminateRouting{closure} …/app/Http/Middleware/RedirectIfUpdateAvailable.php25 21 IlluminateRoutingPipeline IlluminateRouting{closure} …/app/Http/Middleware/RedirectToInstallerIfNotInstalled.php22 0 IlluminateFoundationHttpKernel handle …/public/index.php55 Code .. Read more I have installed fresh laravel project and also fresh auth through command composer require laravel/ui:^2.4 php artisan ui vue –auth but while registering through this auth I am getting the error AppUser not found, by default all is ok, there is no such error and I have not edit any code. My model and controller .. Read more I am using PHP for adding the JSON element to array. This is my database table: Here is my json array: array:8 [ 0 => {#305 +"Queue": "755" +"Location": "427" +"MemberName": "PJSIP/427" +"Status": "5" } 1 => {#306 +"Queue": "752" +"Location": "427" +"MemberName": "PJSIP/427" +"Status": "5" } 2 => {#304 +"Queue": "750" +"Location": "427" +"MemberName": .. Read more I am beginner php developer. I have small problem with my array. I use in my project Laravel 7 I have this code:$items = collect(\$discount->products->toArray()); It’s result me: IlluminateSupportCollection {#1783 ▼ #items: array:2 [▼ 0 => array:17 [▼ "id" => 1 "product_category_id" => 5 "image_id" => null "vat_type_id" => 1 "name" => "Produkt 1" ..