Support the ongoing development of Laravel.io →

4,302 Threads

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

Error Trying to get property of non-object

I am struggling to understand how laravel works and I have a very difficult time with it Model - Use...

0 Likes
1 Replies

Pagination with custom variable

Hi again. I have 3 tabs in a page. I have 3 queries and thus get the results and make 3 different pa...

0 Likes
1 Replies
posted 10 years ago

Help! Problem with creating new records

Hi there, I have a site which needs to go live today, and there is a problem with Eloquent, and the...

0 Likes
9 Replies
Solved

Retrieving Translated Field from Pivot Table

Hello, one of the requirements on the application I am developing is to have it to use an arbitrary...

0 Likes
0 Replies
posted 10 years ago

using the '!='sign inside a where() method

I have a table with a row 'comments'. This is 'opmerkingen' in dutch. Every row can contain 1 commen...

0 Likes
2 Replies
Solved

How to handle relations between table in forms?

Hi, I've been looking for examples for a while and found out that the docs are lacking about this. H...

0 Likes
3 Replies

Conflict in Unique Column Name - Join Statement Query Builder

DB::table('users') ->join('contacts', function($join) { $join->on('users.id', '=', 'contacts.u...

0 Likes
1 Replies

Help getting data from my Database

I have two models with relationship: City and Events. In the controller i have this: $cities = City:...

0 Likes
1 Replies

Insert One to Many with multiple records

Hi there, I would like to insert a post and its images with laravels ORM. Posts title tekst Images...

0 Likes
3 Replies

Eloquent - select single value from database

Hi all, I'm creating a drop down list that gets populated using data from a database. Everything wor...

0 Likes
3 Replies

authenticate from second database

I have a form with a 'name' textfield. When i press send laravel checks if the username exists. If s...

0 Likes
2 Replies
Solved

Passing multiple arrays to a view

I'm trying to work with SimplePie to pull numerous RSS feeds (which is working well); however rather...

0 Likes
2 Replies
Solved
posted 10 years ago

Dynamic model appends

Hello. I'm looking for a way to create dynamic appends to a model. right now i have something like p...

0 Likes
0 Replies

Eloquent has no handling with malicious data??

I did a simple query like: $query = "sdsad'sa"; Spot::where('title', 'like', '%'.$query.'%...

0 Likes
8 Replies

to many queries and long load

Im build my app localy, and Im afraid after Ill get some traffic in to it it will simply crash. and...

0 Likes
3 Replies

Problem with Eloquent - Case sensitive condition

Hi. I perform $a = Items::where('code', '=', $code); In the code column there are various entries, u...

0 Likes
3 Replies

Calling model method from controller

I have this in my car.php model public function bySortOrder() { return $this->orderBy('so...

0 Likes
3 Replies
Solved

Eloquent - Get Post where parent of parent id = XX. It's possible?

I'm trying to get a Post inside a Session, but between Post and Session I have a Category Model. Eac...

0 Likes
1 Replies

Make this query in Eloquent

Hi Can we do this query in Eloquent $tagString = implode (',', $tags); return DB::select (DB...

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.