Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 6 months ago. Improve this question I have been interested in Laravel Livewire for a few days. But I wonder what is the best way to use
Tag: laravel
Is there a way to delay a Mail by seconds or minutes when sending in laravel 5.8?
I have tried using later and queue then specified the seconds like below but i get an error saying “Only mailables may be queued” and Here is my code when sending the email Answer The docs clearly describe how to delay mail sending: Delayed Message Queueing If you wish to delay the delivery of a queued email message, you may
Call to undefined method stdClass::isEmpty() error
I am trying to check if the $pl1 is empty but it does not seems to work. I tried using count() but does not seems to work either. controller: blade.php: Answer The variable $paperlist1 is the Collection, so ->isEmpty() will only work on $paperlist1 and not on $pl1 as $pl1 is each value of the collection. So, @if(!$pl1 -> isEmpty())
Export array to Excelwith MaatwebsiteExcel
I am beginner web developer. I make my project with use Laravel 8 and Maatwebsite Excel. I make this code to prepare data to save to excel file: Generate data work fine. My debug return this: I have problem with save my data to excel file. When I run my code I have downloaded empty file (without my data). How
Select DISTINCT returns duplicates data Laravel 8
I’m trying to get groups that belong to a supervisor to be displayed for him. And I’m using join to get each gpid information base on supervisor_id, query its okay but returns duplicate data of the last row. I can’t figure out why it is duplicating the last record. Any help would be much appreciated. Result Answer You can try
How to validate integers and max float digits in one rule in laravel
Hey guys I need to validate something on my laravel application and I don’t know how. So if the user introduces 1234.55 it should allow it, because it have only 5 numbers, but if the user introduces 12345678.55 must reject! What I have until now. I tried to use digits_between, but when I use this, the validation doesn’t allow float
Laravel fetch data by something else than id
So I’m a total newbie in laravel and I don’t know if it can be done but I saw that in the controller I can display data of a specific ‘id’ with this in my api.php: And this in my BookController.php : I’m using Angular for the front and I have a searchbar to search by ‘title’ of a book,
TCGVoyager doesn’t get translation on relationship
I use Voyager admin interface (v.1.4) for Laravel (v8.0). Voyager supports multiple languages (official documentation: https://voyager-docs.devdojo.com/v/1.4-1/core-concepts/multilanguage). I have this relationship: Process belongsToMany WorkMachine Process hasMany Product Process model: WorkMachine model: Product model: In my controller: The problem is: the Process translatable text works, the output language depends from app()->getLocale(). But the workmachine texts and products texts aren’t translated. I try
Lighthouse graphql custom resolver
Quite new to GraphQL and lighthouse library, don’t be too harsh. Since I can’t use any models because my data source is an API. I’m trying to create a custom resolver that will pass data to a service who will do everything necessary to retrieve data from the API. And it constantly returns me this error: “Field “address” of type
order by where in in laravel with requests
I want to make products to be ordered according to each user request as code below and here is the code it return error orderby doesn’t exist on collection Answer Your orderBy() statements have to be added to the query before you run paginate: