I want to user orders data by specific month in a year. Here is my order Table id | user_id | price | quantity | total Here is my order model Here is my user model In a controller, by doing this I get all user orders Now, How can I get specific month user orders detail? I want to
Tag: laravel
Laravel :value in another language
Laravel 8 php 7.1 I have a form with some input fields. The form is available in English and German. If you don’t enter something in the German version and want to send it, the following text appears: (In English that means This field is required if the job description is not available. ) How can I replace the job
Undefined constant “page_link” (View: resourcesviewshomeindex.blade.php) In the: “resourcesviews/home/index.blade.php” file at line: 19 [closed]
Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 9 months ago. Improve this question Hello i need help in this code Undefined constant “page_link” (View: resourcesviewshomeindex.blade.php) In
Error converting nvarchar into int… being a number? – Laravel, SQL
I am creating a json to save 2 values of a form that have the same name (data) in order to when 2 rows are saved in the table instead of just one at the same time. This structure is created like this and cannot be edited. In principle it works, but in the end it gives me an error
Laravel – convert time to user’s timezone in model
I have the following model that returns data from Dynamo AWS, my data has a time in EPOCH, and I convert it to the formatted date as below: However, the time returning does not match the time that the user is seeing the data and that is why I would like to make the conversion using the registration timezone as
Sending mail using Mailjet smtp in laravel 8
I need to send a few mails with my laravel application, and they are not really personalized. I’ve used the markdown mail system in laravel, and everything was smooth for the tests. I had mailtrap setup to catch all the mails, no problems. Now I have to use mailjet to send mails – not to create emails and everything, just
Laravel 8.54.0 + Livewire : Error SQLSTATE[IMSSP] Tried to bind parameter number 2101. SQL Server supports a maximum of 2100 parameters
I use Laravel Framework 8.54.0 and livewire. I want to call data for my dropdown form. But I get sqlstate error. Could anyone help me find a way to solve this issue? Model: Livewire Controller: View: Answer it says you have more than 2100 records so the query should contain all of them in where query!! Well in some sql
is there any way to validate if two compound index fields already exist in a many-to-many table?
For example here I am inserting the fields question_id, query_id, sub_test_id, test_id, score and answer. the question_id and query_id fields are unique index, how can I validate if when inserting these two fields they already exist in the table? Answer If I understand your question correctly, you are having some troubles when you are attaching something and the entry inside
Allow only numeric and float values with validation in Laravel
I have a field days in my model, now I want to only save integer or float values in this column. Values can be like: 1 2 0.5 2.5 I tried to use numeric but then it is not allowing me to input float values: Any help is highly appreciated. Thanks Answer You can try custom validation rules for your
Convert multiple php code conditions to an SQL command
I am working on a php project where I need a dynamic column to be part of the sql query result, I have a trips table where each one might have many travels, the trip status is always calculated dynamically according to the several conditions below: I need to convert the function below to an SQL function so that the