Support the ongoing development of Laravel.io →

4,311 Threads

Advanced routing issue

Hi, So I've setup my route as follows: Route::group(array('prefix' => 'student/{student_id}/'), f...

0 Likes
5 Replies
Solved

Many child models using one table, filter results based on column value

I want to use multiple models for the same table but each model should return only rows where "...

0 Likes
2 Replies
Solved

How do I sort a result of a query

Hello, Not sure how to phrase this question... hopefully it makes sense. I have a class called "...

0 Likes
0 Replies
posted 10 years ago

Relationship Call to undefined method ?

I'm getting this error: Call to undefined method Illuminate\Database\Query\Builder::Category() At th...

0 Likes
3 Replies
Solved

Eager loading not returning all of the results

I'm trying to eager load a list of credits for a recording. The query I want to run is this: SELECT...

0 Likes
1 Replies

School Schedule - Eloquent & Form

Hi everyone, I am currently building a small app that manages school related stuff. I have to build...

0 Likes
3 Replies

Send email, internal server error 500

Hey guys, I have this form that the user fills out, on successful submit the form saves to the datab...

0 Likes
1 Replies
Solved

eloquent relations picking elements that are not related

I have 2 tables which are related with a Many to Many relation and the relation table. (users, items...

0 Likes
0 Replies

Eloquent not inserting null values on pivot table

I'm having problems where I want empty strings or a zero to be stored as a NULL in the database. Her...

0 Likes
3 Replies
Solved

Saving image path to a database

$image = $input['image']; $filename = $image->getClientOriginalName(); $destination = 'upload...

0 Likes
7 Replies
Solved

Eloquent eager loading, cannot access relation data

Hello, I have 2 models. One is "developer" and the second is "program". One deve...

0 Likes
12 Replies

Many To Many Polymorphic result.

Hi, while working with Many To Many Polymorphic relationships, I notice that if we retrieve nested r...

0 Likes
0 Replies

hasMany with multiple local keys

I have an existing database (can't change the structure) for which I need to make a web front end. T...

0 Likes
0 Replies

Dynamic property on model with implode method

Hi all, I was wondering how I could do the following. I have a user table with 2 field 'first_name'...

0 Likes
1 Replies

Model inheritance in DB (or multi-table models)

Let's assume we have a catalog. We have base Item model and item types model (Car extends Item, Moto...

0 Likes
0 Replies

Transaction with a unique key

Table : photos #id -> primary key #item_id -> foreign_key #title -> string #order -> int...

0 Likes
0 Replies

How to delete an image file when deleting a page?

In controller: public function deletePage() { $pageClass = $this->page->find(Input...

0 Likes
8 Replies
Solved
posted 10 years ago

jenssegers mongo.. Laravel Core Eloquent relation break

I have created a very large project in laravel with mysql. I have switched by using https://github.c...

0 Likes
0 Replies

Use connections table to source the Eloquent connections

Dear friends, How could be possible to use a database table as a connection container in place of us...

0 Likes
0 Replies

Return results as an array

I'm working with some log data and it returns about hundreds and thousands of data. Without using ch...

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.

© 2024 Laravel.io - All rights reserved.