Support the ongoing development of Laravel.io →

4,312 Threads

json_decode returns null on reponse:json string on 'local' API

However if I do return $response; all the data is perfectly displayed. It seems like json_decode onl...

0 Likes
0 Replies
posted 10 years ago

Best way to handle user input filters for a list of records?

Ok, maybe I'm tired today but I cant figure out the best way to handle this: I have a paginated view...

0 Likes
2 Replies
Solved

Eloquent model default scope.

Hi all, I am looking to create two models, both on top of the same table. I know that I could do wit...

0 Likes
2 Replies
Solved

Plans about VoltDB support - libraries

Hello Laravel community, Has someone initiated the development of libraries to integrate VoltDB into...

0 Likes
0 Replies

Add two months to the current date

Hi, I am trying to add two months to the current date : $sale->sale_date = date('Y-m-d 00:00:0...

0 Likes
8 Replies
Solved
posted 10 years ago

Chaining hasMany relationships

Let's say a school has many teachers, and each teacher has many pupils. Is there an easy way of retu...

0 Likes
6 Replies

Eloquent Relationships Bad Practices?

If I have two models: Institution and InstitutionStatus Is it considered bad practice to have Instit...

0 Likes
1 Replies
Solved

from QueryBuilder query to EloquentORM query

Hi, In my model I have users. Each user may have some roles. Each role have some allowed activities....

0 Likes
0 Replies
posted 10 years ago

Eloquent and database functions

Hi there. I'm new to Laravel so please be gentle with me! I'm a little stumped as to how I would go...

0 Likes
3 Replies
Solved

Default value for all Eloquent attributes

Hi, I'd need to set a default value for any Eloquent model attribute. So, for example if I try to ge...

0 Likes
6 Replies

Laravel Pagination in eloquent ORM with()

have used pagination in laravel and that time the query is very simple. So I have manage to work on...

0 Likes
0 Replies

Getting 'undefined method error for orderBy()' on new repository

With the help of some nice folks over on Reddit I was able to get most of my controller functionalit...

0 Likes
1 Replies

Is it possible to set properties to the authenticated user?

In the User model, I've created a property called groupMembership and a method called setGroupMember...

0 Likes
3 Replies

Adding Select statement to ORM

Retrieving A Record By Primary Key $user = User::find(1); var_dump($user->name); Is there anyway...

0 Likes
4 Replies
Solved
posted 10 years ago

Retrieve the sender username of a message with relationships

In my Message.php model, I defined the following: class Message extends Eloquent { public functi...

0 Likes
3 Replies
Solved

Relation with dynamic entity

Hello guys, I got this big question on this scenario: I'm building a easy post and comment system, b...

0 Likes
2 Replies

Related table, possible issue with table name?

Hi, I have a simple scenario here that is bugging me. There are two models: class DbNation extends E...

0 Likes
3 Replies
Solved
posted 10 years ago

getDateAttribute() is swapping year and day around when Saving to the Database

Retrieving a datetime field which is YYYY-MM-DD and I need to display it as dd/mm/yy. So I am using...

0 Likes
4 Replies

A bunch of questions about the "right" way - DI, IoC, Repo pattern

Some background: I've been working with L4 for about 6 months doing things the "pretty" wa...

0 Likes
1 Replies

[Conversation] Help me refactoring this class and make it testable

Hi all, I've this lil class that helps me in building a form for a specific case: Invoice Infos http...

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