Support the ongoing development of Laravel.io →

988 Threads

Getting Call to undefined method, while pulling records from a model.

I must be missing something obvious here... I have a model called PlanType and another called Pricin...

0 Likes
2 Replies
Solved

Baum Nested Set Retrieve all tree with relation

Hi, I have Category model based on Baum Nested Set (https://github.com/etrepat/baum) package and Cat...

0 Likes
2 Replies
Solved

Laravel import thousand of records from csv file?

I have a csv file with thousand of records. How can I use Eloquent model to import all data?

0 Likes
2 Replies
Solved

Eloquent Mutator + DB::raw

This Setter works well... public function setPoligonoAttribute($value) { $this->attributes['polig...

0 Likes
3 Replies
Solved
posted 10 years ago

Get latest row of table in model.

I got the following code and want the latest result. // Model public function getProfilePic() {...

0 Likes
1 Replies
Solved

Three table relationship problem in view: Product, producimages, imagetypes. How to show images by type in specific section in view. Not all images.

Hello, can anyone help me with my problem. I can't seem to solve it. I want to show in blade view im...

0 Likes
2 Replies
Solved

How do you create a model relationship base on a column value?

Hi guys! I have a comments table and this table has four fields which are : id post_id type_id comm...

0 Likes
1 Replies
Solved

What is the proper way to set up a model to refer to a table in a different database?

Hi guys! I have two databases main and beta. In my database.php file I have setup the connection to...

0 Likes
2 Replies
Solved

Eloquent select from related table where...

Hi, I've read the eloquent docs, but can't seem to find the answer - am I missing something? I am tr...

0 Likes
2 Replies
Solved

Laravel Relationships - Getting Related Eloquent Objects in a query.

Hi All, I cannot find this in the docs or on SO, so i figured I would post my question here: I have...

0 Likes
1 Replies
Solved
posted 10 years ago

SQL Order By list of strings? but in Eloquent

I wonder if it is possible to order by list of strings using eloquent? http://stackoverflow.com/ques...

0 Likes
2 Replies
Solved

Nested query in FROM

Hi! I'm really newbie and I'm not sure how to do queries with Eloquent. My SLQ query is this: SELECT...

0 Likes
4 Replies
Solved

using javascript to set a variabe

i have an form that is set to upload an image and update a database with the image data (if needed)....

0 Likes
2 Replies
Solved

How to get timestamp integer instead of Carbon object

My application has to adapt to an existing database which uses integer timestamps instead of string...

0 Likes
2 Replies
Solved

Please Help Me to get this solve

I want to display 'Recent Comments' from comments table, including HotelName related to that Comment...

0 Likes
1 Replies
Solved
posted 10 years ago

how do i prevent an attributes value being saved if its got an active Accessor?

I have a Product model in which I use a getPriceAttribute($value) to display a products discounted p...

0 Likes
4 Replies
Solved

Search through relationships

Hi! I have a little problem that I'm not quite sure how to solve it. To simplify, lets say that I ha...

0 Likes
4 Replies
Solved

Resource authentication and session data

In my controller I have: public function __construct() { $this->beforeFilter('auth', array('excep...

0 Likes
2 Replies
Solved

While using Eloquent relationships, user id is not saved

Hello I'm learning Laravel 4, and I came up to Eloquent relationships. I have two models, user and g...

0 Likes
2 Replies
Solved

Mocks and namespace

Hi I had a few tests, no problem with phpunit execution. I added namespaces to my Models and control...

0 Likes
2 Replies
Solved

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.