Support the ongoing development of Laravel.io →

4,311 Threads

Eloquent Relationships related question

Hi laravel community, I am a new laravel user and currently working on a simple project management t...

0 Likes
3 Replies

L [5] : Use Eloquent model Globally without using namespace

I want the Eloquent model in app ->Models ->users.php and in every file i h...

0 Likes
4 Replies

Foreign key insertion problem in qualification table using laravel 4.2

// qualification.php model <?php class Qualification extends \Eloquent { protected $fillable...

0 Likes
1 Replies

Looping through collection

I am filtering a collection by date of orders with the following in each: {"id":57,"...

0 Likes
4 Replies
Solved
posted 10 years ago

Eloquent Single Table Inheritance

What is Single Table Inheritance? I saw a post by Kapil Verma where he shared his STI base class. I...

0 Likes
8 Replies
posted 9 years ago

Laravel 5 Belongs To Many Problems

So I'm building out a multi-relational database structure, and I'm attempting to retrieve nested chi...

0 Likes
4 Replies

Insert/Update/Delete on Lookup table from Dynamic Array?

Hi, I was wondering what the best way to do this with Eloquent would be? Say for instance I have a &...

0 Likes
6 Replies
Solved

Foreign key, link not working

hi, I have the following schema: Schema::create( 'teams', function (Blueprint $table) {...

0 Likes
2 Replies

Eager load one record from a many to many relation

Hi I'm having a struggle trying to return a single record from a many to many relationship. So in my...

0 Likes
0 Replies

morphMany returning NULL

I'm having a problem with polymorphic relationship. I have the following classes: BankAccount.php...

0 Likes
14 Replies
Solved

Is this right way to do READ UNCOMMITTED?

Is this right way to do READ UNCOMMITTED? $cars = Cars::raw('SET SESSION TRANSACTION ISOLATION LEVEL...

0 Likes
2 Replies

Getting all records from a collection

Hi, Ok,so I am setting up a relationship between my users and roles table, everything went fine unti...

0 Likes
2 Replies
Solved

One to many relationship returning NULL

Hey, I'm having an issue I've been trying to figure out for the last few hours, but I can't seem to...

0 Likes
8 Replies
Solved

Select time from base as UNIX_TIMESTAMP(time)

Hello, I have in base field with type datetime, it's time field. I want to get all elements from bas...

0 Likes
1 Replies

Will Model Relationships work with No Table relations in database

Hi Guys, I have a database that predates me and it has no relationships define in the database itsel...

0 Likes
2 Replies
Solved

Eloquent timestamps - use only created_at

I have a problem with a model, I only have created_at field and I added getDates() method which retu...

0 Likes
2 Replies

Joins in Model or Controller?

Hello, when i need to use joins(), how to use it? Belongs it model or in controller? Can anyone give...

0 Likes
1 Replies

Form Request Problem

Hi there! I've just done the Blog example from the Laravel 5 Fundamentals (Laracasts) and I'm trying...

0 Likes
3 Replies
Solved

Get Data from MySQL with where()

Hello, i am new at laravel, and i want to show userprofile by slug. When i use Profile::all() or Pr...

0 Likes
3 Replies
Solved
posted 9 years ago

Export data to excel

Am trying to use maatwebsite/excel to export data to excel but am unable.It come out as a corrupt fi...

0 Likes
5 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.

© 2024 Laravel.io - All rights reserved.