Support the ongoing development of Laravel.io →

4,606 Threads

Model inserted with empty strings instead of null values

I am using Laravel 5.1.24. I have a simple 'Product' table created in db (MySQL5.5) like this: CREAT...

0 Likes
0 Replies
0 Likes
3 Replies
Solved

Laravel 5: fetch data from data base and display it

hi im with laravel 5.1 im trying to fetch data from table. categorys and products categorys has foll...

0 Likes
1 Replies

Laravel 5 Undefined property: Illuminate\Database\Eloquent\Relations\HasMany::$category_name

I am developing a product and category relationship. where i wanted to show to which category, a pro...

0 Likes
3 Replies
posted 9 years ago

Change binding key many 2 many

Hey guys, I have a table with products and a table with categories. I don't use the products.id and...

0 Likes
0 Replies

How to get some specific datas.

Heya, i'm a newbie with Laravel,i'm trying to show some specific informations from my database, but...

0 Likes
2 Replies

get only specified columns from the join table

First I have this 'User' model <?php namespace App; use Illuminate\Auth\Authenticata...

0 Likes
1 Replies

Fetch Collection with Condition on distant Relationship

I"ve following relationships: Heartbeat belongs to Entity Entity belongs to Branch Branch belo...

0 Likes
0 Replies

Eloquent ORM how to avoid duplicate conditions

How can i prevent duplicate Shop data(shop_name)? when I dd($data) it return null; ** Database: ** |...

0 Likes
1 Replies

Ignore $with from eloquent

Hey, I have one model where i set $with variable to always take a relationship. But i have one case...

0 Likes
2 Replies

Button to delete database item

If in my Blade template I had this: @foreach($entries as $entry) <li>{{$entry->filename}}&l...

0 Likes
6 Replies

Make an Inner Join with two different tables

Hi ! I have a table named professor_turma, which has some importante keys: ´cod_professor, cod_disci...

0 Likes
0 Replies
posted 11 years ago

Getting the enum possibilities for an enum field

How do i get the enum options from an enum field? I have a field in Users called Role, in the databa...

0 Likes
3 Replies
posted 9 years ago

Foreign key problem

I've got a problem with a foreign key on my articles table, i want to associate a user for each arti...

0 Likes
1 Replies

New to Eloquent, but can't make this simple relationship work!

SOLVED My mistake, I mixed up the model relationships :) Hi guys, I'm new Eloquent (usually use raw...

0 Likes
1 Replies

File upload through ajax in laravel

I am doing ajax call on click of submit button. then that call goes to controller. In controller i w...

0 Likes
2 Replies

Erro: SQLSTATE[HY000] Unable to connect: Adaptive Server is unavailable or does not exist (severity 9)

Sorry my bad English... In my vagrant debian virtual machine show error on connect sqlsrv database E...

0 Likes
0 Replies

Eloquent Query takes long time

Hi, I am trying to fetch ALL rows from a table in my dB. I need to get all rows because the data is...

0 Likes
1 Replies

updatedBy, createdBy, deletedBy - user ID or user name?

I store these columns in some of my Models, my question is, should I store the users id or the users...

0 Likes
7 Replies

Having trouble updating a one-to-one relationship through PUT request

Hi everyone. I'm a junior dev at an agency building a site for a client with Laravel and Angular tha...

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.