#### Category : laravel-6

im currently trying to figure out, how to conditionally change the mailserver. The Mail is a Notification, which gets send via the queue worker. I tried multiple approaches such as: Setting the Config dynamically with Config::set, using a Middleware and removing the MailserviceProvider etc. But the Mail still gets send out via the mailserver that ..

I’m currently busy updating our Laravel Mix to 6. All the scripts work fine, the only issue i’m having is that the App.js (Vue) references the node_modules folder instead of importing these scripts. On the older laravel-mix the watch function would just import the scripts instead of referencing the files. The production script works fine. ..

I’m trying to understand the following. On my config/app.php I’m having my local timezone set to: ‘timezone’ => ‘Europe/Athens’ My Postgres is set to: SHOW timezone; // returns UTC In the inserted rows in Postgres i would expect to see my local timezone, converted to UTC. Instead, the timestamp is written on my local timezone. ..

I am trying to access a route from a package but I get route not found – even though the route shows when I am using the command php artisan route:list. I have tried clearing all cache but still no success? Everything works fine in my local environment so I am leaning towards a cache ..

I have been working to debug an old Laravel app made by another coder. In the code below, transaction->get() returns rows from DB. In this case, one row. The count returns one, and even if I var_dump(transactions[0]->id) I will get the response. But, when I do each on it, it fails and if I comment ..

I have an object that consists of multiple data as controlNumber each controlNumber has shipment.qty what I want is to total the qty of each same controlNumber and display one controlNumber with total qty. collection is below "collection": [ { "id": 983, "controlNumber": 4498818, "ItemNumber": "PS2W12077", "shipment": { "id": 27, "Item": "PS2W12077", "ColorCode": "GRPFR", "qty": ..

I have two collection as follows. $openorder_data = OpenorderImportTemp::select(‘id’, ‘controlNumber’, ‘ItemNumber’)->orderby(‘id’, ‘desc’)->where(‘ControlNumber’, ‘!=’, ‘0’)->get();$shipment_data = ShipmentImportTemp::select(‘id’, ‘Po’, ‘Item’)->orderby(‘id’, ‘desc’)->where(‘Po’, ‘!=’, ‘0’)->get(); what I wanted to do is find the same recode on $shipment_data and$openorder_data using ItemNumber, and Item columns. both ItemNumber, and Item columns will have same value on this two different collection. ..

Updated Laravel to version 6, but an error appeared at the validation stage Illuminate Validation ValidationException The given data was invalid. /vendor/laravel/framework/src/Illuminate/Foundation/Http/FormRequest.php * Get data to be validated from the request. * * @return array */ public function validationData() { return $this->all(); } /** * Handle a failed validation attempt. * * @param IlluminateContractsValidationValidator$validator ..

could not validate an array of input in laravel 8. from the frontside I have gotten the serialized form data which was successfully accessible from the backend. public function GetForm(Request $request) {$request = $request->all();$input = array(); parse_str($request[‘data’],$input); return $input; } output: { "inputID":"26", "inputName":"Julie Hughes est", "inputPhone":"+94111222333", "inputEmail":"[email protected]" } what I want .. Read more I am trying to see if a user id is contained in a json field in my laravel collection. In my postgresql database I have a user_id field which contains a list of integers that pertain to my user model and table. I am aware in eloquent I can use the whereJsonContains method but I .. Read more$ekstra=" <a href="{{route(‘bayi.ev-toplantilari.onay’, $ev_toplanti->id,$ev_toplanti->sunumcu_id)}}">Onay"; https://prnt.sc/1wrq5wa Sourc..

I am using Laravel 6 with Voyager admin panel. I have two different Laravel models and I am deleting their items from Voyager admin panel, deletion works well for items of both models. I want to add some actions on model deleting so I add this code to both models. It works for model A ..

When we make a request to our database with a nine hundred or more IDs in the request body we are hit with a 419 | Page Expired response. However when we make the same request with 800 or fewer IDs the request executes successfully. Why would a large request size throw a 419 error? ..

How can I create a nested list of breadcrumbs categories in Laravel Controller? I want to create something like this: Craft/Stone Craft/Paper Craft Craft/Paper Craft/Pain Paper Craft/Paper Craft/Color Paper My Category Model like id, parent_id, name Sourc..

I have a route that looks like this: Route::namespace(‘ApiHelpGuides’)->prefix(‘help’)->group(function () { Route::get(‘/{userInput}’, ‘FetchArticlesController’) ->where(‘userInput’, ‘.*’); }); And the controller that looks like this: public function __invoke(Request $request, string$userInput) … I want to be able to capture the $userInput so if I receive a request from the front-end that is like: /api/help/anything/could/be/in/here?including=params That I can .. Read more I have a function inside a controller which has 3 parameters I had used to filter some values from the database. currently what I have done is working. but I am looking to short the code and asking proper better coding exeperice to full fill a filtering option in laravel. the code I have tried .. Read more Postman return response I need to add an array field after "transaction_type": null, "repay": true if "payment_status": payment_pending Sourc.. Read more Working on a laravel 6 project. But when I try to execute ‘php artisan schedule:work’, it shows "Command "schedule:list" is not defined". ‘php artisan schedule:list’ shows the same error. Only ‘php artisan schedule:run’ is working. But scheduler is not executing command as scheduled. It works only when I execute ‘php artisan schedule:run’ Sourc.. Read more Is there polling in livewire package (version 1) in laravel 6? I want to make realtime notification part of my project, so I want the notification so that the page cannot be updated, or if another tab is open, I want my notification to be received without refreshing it. I would like to get other .. Read more I’ve 2 create in the same function store, but one field of the 1th create it must be the same of a field in the 2th create. Is it possible? DataController.php public function store(Request$request) { SendData::create($request->validated()); // How I take here data from firt ::create ??$random_data_from_form1 = ?? $data_from_form2 =$request->input(‘data_form2’); SendMoreData::create([ ‘field1’ ..

I’m trying to add some default value to a specific parameter if there isn’t any value already set. I’ve already tried the following code in the register function of the AppServiceProvider class but it’s not working: $this->app->extend(‘route’, function ($name, $parameters,$absolute, $app) { if (!in_array(‘locale’,$parameters)) { $parameters[‘locale’] = app()->getLocale(); } return route($name, $parameters,$absolute); ..

As you can see I wanna save the same data fields x2 at the same time in DB. But, because of its structure, in the first <div> there’s not language and his options. In the EnviarCurriculumController.php it’s suppose if there’s not info there it’s gonna be substitute by ”, ergo (NULL) in DB. But instead ..