Support the ongoing development of Laravel.io →

4,311 Threads

querying based on input using eloquent

hi how do you usually querying using eloquent from database based on the value, for example you will...

0 Likes
2 Replies

code within a Route runs more than once

Hi, I have this route: Route::get('/develop/building/{building_id}', ['as' => 'develop.building',...

0 Likes
8 Replies

How to pass an object in a function

Hello, I'm using Baum nested sets to create parent - child categories and relate my categories with...

0 Likes
8 Replies
Solved
posted 9 years ago

Applying a where() clause for each table using Eloquent

I have a problem that the docs don't seem to cover (or I'm just not seeing anything in the docs that...

0 Likes
2 Replies
Solved

Eloquent relations

Im having a bit of trouble to find the best and correct way to set up my Models relationships to fet...

0 Likes
1 Replies
posted 10 years ago

How to add a dyanmic appends to a model

I've got restful API set up in the /components/index/ route. Components have a belongsToMany relatio...

0 Likes
5 Replies

Pessimistic Locking - Can Someone Explain??

I'm trying to understand what Pessimistic Locking is. It's referenced in the documentation (http://l...

0 Likes
1 Replies

How to allow not $fillable field to be mass-assigned in certain situations?

I have a general User model with general mass-assign white listing of fields as protected $fillable....

0 Likes
5 Replies
Solved

Manually set belongsToMany relation

Hi I'm trying to manually set relations according to the configuration file. In my constructor for e...

0 Likes
0 Replies

Chaining hasManyThrough relationships

Hi! I have a model named User, that has an one to many relationship with a model named City, that ha...

0 Likes
2 Replies

Related models that don't have a database representation

So I'm developing a REST API, with the following schema members id other field other field member_...

0 Likes
1 Replies
Solved

[ask] Chaining one to many relationship

It's been two days debugging. is there a way to chain this properly ? I tried $post = Post::has('com...

0 Likes
2 Replies

Eloquent Join Table Comment, Post, and User.

Hello everyone. I have 3 Tables Posts id content Comments id commented_id (user_id) user_id User...

0 Likes
2 Replies
Solved

Strange Behavior. Controller Var dump results different than blade var dumpresults.

Greetings, I am returning a value from a variable in my controller but it yields different results w...

0 Likes
4 Replies

Complex Relationship Query [Team->county and Team->users->roles]

Hello guys, I am having some trouble filtering data through a relationship that i created... CLASS T...

0 Likes
1 Replies
Solved

Most efficient way to get count of related tables

I'm looking for the most efficient way to get the count of related records from related tables. The...

0 Likes
2 Replies
Solved

Eloquent Join Table.

I have 2 Tables User id full_name Post id user_id title content How to find out User.full_name f...

0 Likes
2 Replies
Solved

Search function in API

I'm willing to implement a search function with a Integration of a school API. in other words. I'm w...

0 Likes
6 Replies
Solved

I extend Ardent, how to extend a other class

I use Ardent for my models, but i want to use this packages: https://github.com/lazychaser/laravel-n...

0 Likes
0 Replies

How to store ip address at Laravel?

So I want to store users ip in my database, but I coulnd create VARBINARY(16) in my schema builder....

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