Support the ongoing development of Laravel.io →

4,604 Threads

Set table on model for get last record

I need to set dynamically the table name (extract from other database) and get the last record. This...

0 Likes
1 Replies

Why is the DB prefix not in the .env file by default?

One of the first things I do for every Laravel project is to add this: config/database.php 'prefix'...

0 Likes
0 Replies

Urgent: Daily Error in production Environment [PDOException in Connector.php line 55: SQLSTATE[HY000] [2002] No such file or directory]

Hello Everyone, Every morning I try to open my client system I get the below error. To solve it, I k...

0 Likes
1 Replies

Custom Validation on Multiple FileUpload

I'm having problem return false on this multiple file input. It is working for textboxes. Anyone can...

0 Likes
0 Replies

Trailing data error in Carbon data from postgresql

Hi, outputing data from created_at field lavarel 5.4/postgresql 9.4 I got error: InvalidArgumentExce...

0 Likes
0 Replies

Authentication with email and phone in a separate table

First of all, sorry for my bad english, I will try my best to explain it. I'm using Laravel 5.4 and...

0 Likes
0 Replies

General error: 1215 Cannot add foreign key constraint

Here are my migrations: photoset_categories class CreatePhotosetCategoriesTable extends Migration {...

0 Likes
5 Replies

add timestamps on multiple tables

how to add timetamps with default value on multiple tables using migrate

0 Likes
1 Replies
posted 7 years ago

2 dimensional JSON array

I want to create 2 dimensional JSON array from database. The format will be as followings [ {"i...

0 Likes
1 Replies

Laravel-5.4 - how to store the image path in database for all users who registers

I am using laravel-5.4 make:auth . Added one extra field in user table -> profile picture in view...

0 Likes
2 Replies

How to join a additional tables after pivot table join

I have a pivot table "show_user" with columns show_id, user_id in my App\User.php i have p...

0 Likes
1 Replies

setting rule for unique name on existing row

Hello, in laravel 5.4 setting rule for unique name like $rules = array( 'name' => 'r...

0 Likes
2 Replies

can't determine source of integrity constraint violation

Hi, I'm trying to work out why Laravel is throwing Integrity constraint violations on my main regist...

0 Likes
1 Replies

Eager Loading + Join

If I do this, I would be able to retrieve the images() for the item $items = Item::all(); foreach($i...

0 Likes
2 Replies

Create dropdown using lists() method to get two columns and combine them in final view

I was working with dropdowns and was thinking if it is possible to use lists() method to get two col...

0 Likes
4 Replies
Solved

How to store empty DateTime input to Null value instead of 0000:00:00 00:00 value

Hi, i had two input Datetime field. User can choose to fill in either these two field. For the empty...

0 Likes
2 Replies

Argument 1 must be of the type array when seeding random data

Hi I'm fairly new to Laravel and the way sync handles collections or array has me stumped when synci...

0 Likes
2 Replies

Laravel 5.4, problem saving an associated model

i'm trying to save a new tvshow and it's episodes into the database with the following code but in t...

0 Likes
1 Replies
Solved

Seeders within a package

Hello, guys! I'm working on a small reusable package and one part of it - to publish some seeds. I w...

0 Likes
2 Replies

LARAVEL 5 How to UPDATE one to many (hasMany) relation into DB by maintaining Items current id

Hi, i had two modules which are Product and Items Modules Here the relationship between these two mo...

0 Likes
0 Replies

Thanks to our community

Solutions given in the past year. Excluding solutions from thread authors.

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.