Support the ongoing development of Laravel.io →

4,301 Threads

posted 10 years ago

The variable loses its value inside the SQL query in Eloquent (a matter of scope)

Hello and good day to everyone The issue is tricky (for me). I passed the parameter value from the c...

0 Likes
15 Replies
Solved
posted 10 years ago

Checking if object is related in many-to-many

I have a Post model with the following function: public function tags() { return $this->belongs...

0 Likes
1 Replies
Solved

Laravel Quickstart: Class 'User' not found

Dear Laravel Users, I just got to know a few days ago about Laravel (=> I'm a "stupid starte...

0 Likes
5 Replies
Solved

Change associated table in model with setTable() don't works

Hello community, I try to get data via one model from two different tables, so I want to change the...

0 Likes
0 Replies

Model attribute accessor not working with object_get helper function

The model: class Item extends Eloquent { public function getCentsAttribute() { return substr(...

0 Likes
3 Replies
Solved

How can I cache all data in Eloquent

How can I try to using cache for all of Eloquent query. Example: $users = User::remember(10)->get...

0 Likes
1 Replies
posted 10 years ago

Mass assignment User::create() undefined and $user->save() undefined ?

Hello everyone! I have a little problem to register a user. Here is the function that processes the...

0 Likes
0 Replies
posted 10 years ago

getting model belongsTo attributes

class Batch extends Eloquent { public function coupons() { return $this->hasMany('Cou...

0 Likes
1 Replies

How to reference this object's "belongsTo" user?

In my Car class I have public function user() { return $this->belongsTo('User'); } public fu...

0 Likes
9 Replies
Solved

whereNotIn Query replacing my array variables

Hello All, So I have some weirdness happening. I'm trying to do a search on a track database that I...

0 Likes
2 Replies

Delete quotes in query to execute

I need to execute a query with group by. But the group by is not for a field. I need to group by wit...

0 Likes
0 Replies
posted 10 years ago

4 table join together

I have 4 tables TableA hasMany TableC TableB hasMany TableC TableC hasMany TableD I want to connect...

0 Likes
2 Replies

Composite primary key

Hi ! I read that L3 didn't support composite primary key, is it the same for L4.1 ? In my case it's...

0 Likes
2 Replies
posted 10 years ago

How to perform a tag search ?

Hi, Given this simple database setup: posts - id tags - id post_tag - id - post_id - tag_id ......

0 Likes
4 Replies
Solved

Getting a data from model & use in controller

In relationship from the questions I have ask previously, Question 1: Inserting selected fields from...

0 Likes
9 Replies

Children Models

I would like to have the following models: Employee, Agent, Client. Since half of all the fields and...

0 Likes
3 Replies

Master-Detail

good morning, someone who can help me, I need to create a route between father son model to model, l...

0 Likes
2 Replies

HipHop (and / or NGINX) and Saving new Records

Hi there, This was a different thread, but incorrectly titled. Anyway, here's the problem: On our d...

0 Likes
3 Replies
Solved
posted 10 years ago

Cannot call a function from model

Hi, I am new to laravel and this is pretty basic problem (I think) but for some reason I can't get m...

0 Likes
3 Replies
Solved
posted 10 years ago

Custom methods

Hi, is there any way to add custom methods to eloquent models? e.g.: class User extends Eloquent {...

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