Support the ongoing development of Laravel.io →

4,302 Threads

posted 10 years ago

How can I access additional models from a pivot?

I have three primary tables, Accounts, Users, Roles. All accounts are owned by a user but not all us...

0 Likes
6 Replies
posted 10 years ago

Consuming JSON via REST

Looking at interest at Laravel as a PHP framework. I have a question relating to its ability to use...

0 Likes
0 Replies
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
posted 10 years ago

Relations in namespaced models

I started to move all my models to namespaced directories /app/lib/Acme/models, but noticed that whe...

0 Likes
1 Replies

Temporary file not found on model create?

Hi everyone, so what i want to happen is when the form is submitted, an image is uploaded and the mo...

0 Likes
0 Replies

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

Dynamic classes from eloquent

Hi everybody, I'm just getting started with Laravel and SOLID development, and I'm having trouble fi...

0 Likes
1 Replies

Mocking Model Binding

I'm new to writing test cases and I'm writing a test to see if the edit resource page is shown corre...

0 Likes
0 Replies

Resource authentication and session data

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

0 Likes
2 Replies
Solved
posted 10 years ago

Laravel eloquent relationship

I have a table ranks as position player_id 1 77 2 99 3 12 and one more table players as id na...

0 Likes
4 Replies

Best practice for validating relationships using Ardent?

I'm working on an application containing log messages and users. The respective models are LogMessag...

0 Likes
0 Replies

Validation inside a mutator/setter

I was reading the following: "Validation should happen within the context of the setter prior t...

0 Likes
0 Replies

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

Where does those calls come from?

Hi, I installed php-debugbar and this is the output I get. select * from `pages`133μs256KB3000000005...

0 Likes
2 Replies

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

Laravel bug or my mistake?

Good night, In this code, i got an error that says that the variable userId doesn't exists when its...

0 Likes
2 Replies
Solved
posted 10 years ago

Help with relationships.

Hi everyone I am having a slight issue with relation ships (honestly I think it's just my thick skul...

0 Likes
2 Replies

Bulk insertions on db table

Hi, I have to insert in a table something like 18000 records. I didn't try to use Eloquent, but usin...

0 Likes
7 Replies
Solved

Load Eloquent from Main View

I'm just in my first laravel project. It has a small blog and uses notifications just like a social...

0 Likes
7 Replies
Solved

one-to-many relationship without actual foreign key in database

I want to mak a one-to-many relationship like in the tutorial. One To Many An example of a one-to-m...

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.