Support the ongoing development of Laravel.io →

4,311 Threads

When inserting Postgresql JSON type field in eloquent, getting a escaped string

Hi, im having this issue, more info http://help.laravel.io/628636319849786ae066f7dfe72389b0e1d3e140,...

0 Likes
0 Replies

Repository pattern: how to access related repository's method?

I have two eloquent model: Foo and Bar. class Foo extends \Eloquent { public function bar()...

0 Likes
2 Replies
posted 10 years ago

GroupIn Method for Collection

First of all, English is not my primary language and if the group in term is wrong for what I'm tryi...

0 Likes
1 Replies

Laravel pivot table Base table or view not found

Hi im trying to query my tasks table. A little background information on the tables and how they are...

0 Likes
1 Replies
posted 10 years ago

How to "split" an Eloquent request construction ?

Hi. I am trying to do something like this : $name = Input::get('name'); $keywords = explode(' ', $na...

0 Likes
2 Replies
Solved

Getting data of model related as an array

Hi... maybe it's a newbie question... these are my first steps with Laravel.. suppose I have in Post...

0 Likes
2 Replies
Solved

Filtering Results in RestAPI with attributes from a related model

I'm currently building a REST API with laravel. I'm trying to implement filtering of results on a ro...

0 Likes
2 Replies
Solved

Can you use sum() or something like it in a whereHas() statement?

I have a model called 'Charges' which stores charges made by someone. I want to sum all the charges...

0 Likes
1 Replies
Solved
posted 10 years ago

How to determine if model support soft deleting?

Hello, is there a native way to determine if a model supports soft deleting? Something like: User::u...

0 Likes
2 Replies
Solved

Route Model Binding with addtional optional parameters

I just can't get this to work: Route::model('mymodel', 'Mymodel'); Route::get('/test/{mymodel}/{view...

0 Likes
0 Replies
posted 10 years ago

Checking if friends.

I want to check if people are friends. I want to check if in a row both the authenticated user exist...

0 Likes
5 Replies
Solved
posted 10 years ago

MorphToMany

Can someone give me an example of how to save elements with this relationship? Currently I have Prod...

0 Likes
0 Replies

HELP! Query with join on pgsql

Hi, I want to have sql query like this: SELECT * FROM "public".user inner join ( SELE...

0 Likes
0 Replies

Eloquent Model Factory / Model Code Generator

Hey folks, There are times when heavy model customization is required, and I want to access data wit...

0 Likes
2 Replies

paginate() problem

I have a problem with paginate() with hasmany(). I have 2 tables. Categories and posts. I showing po...

0 Likes
2 Replies

One to many relationship help

I have a table named attendance and another named students_attendance. I add an attendance record to...

0 Likes
3 Replies

rendering data of a join query

i've been able to construct a join and it works: $projects = Main::join('builds', 'mains.build_id',...

0 Likes
1 Replies

Many to Many Relationship

Hi, how I hidden column on many to many relationships? Square.php public function sitesquares() { //...

0 Likes
0 Replies

Database query: nested object

Hi, I am trying to create a beautiful API. Lets assume we have 2 tables, relationship one-to-many (a...

0 Likes
2 Replies
Solved

Model Observer And Events When Create

There are two ways to create new record in laravel $model = new MyModel; $model->field1 = 'value1...

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