Support the ongoing development of Laravel.io →

4,311 Threads

Weird problem in Model/Eloquent with 1 to many relatshionship

Hi everyone! I have a partial problem in 1 to many relationship. I am trying to create 3 AJAXed drop...

0 Likes
4 Replies
Solved

Unlimited Depth Nested Eloquent Collection

I am currently building a menu/category package for my blog which should have the ability to be unli...

0 Likes
3 Replies
posted 10 years ago

Showing "11/30/-0001" when 0000-00-00 date is formatted

I'm trying to use an if statement: if('0000-00-00'!=$method->date_field) { do this } Then f...

0 Likes
2 Replies

How to sync pivot data via morphedByMany ?

Hello ! i'm trying to sync a polymorphic pivot table from the morphedByMany side of a relationship....

0 Likes
0 Replies

Laravel 4: Updating table Joins with form model binding

​​ I once did an eager loading query and it worked. Then using model binding i'm trying to update my...

0 Likes
0 Replies

validation unique using several fields

Hi, I have a model that in combination of 3 fields it needs to be unique. for example: protected $r...

0 Likes
4 Replies
Solved
posted 10 years ago

Valitadion rule to check if it is not imself

hi, I am using a polymorphic relationship to connect categories and pages together. A category can h...

0 Likes
0 Replies

One to One Relationship with two fields(columns) connection, how?

I have three table: table HouseHold(HouseHoldID) table Member(HouseHoldID,MemberID) table PatientCa...

0 Likes
2 Replies
posted 10 years ago

Get data from an insert query?

I know you can get the insert id of a query with: $query->id But is there a way to get data back...

0 Likes
1 Replies

repository convert eloquent in to generic data

I loved the idea of repositories but Im having problem on how to convert those eloquent objects to g...

0 Likes
15 Replies

Can I improve my DB::select query?

Hi, It seems a bit overkill what I have, after some searching I finally got my query working but not...

0 Likes
0 Replies

Best practice - place large queries in model or controller?

Hi, I'm quite new to laravel, so trying to get the hang of the best practices at the moment. Today I...

0 Likes
7 Replies
Solved

Call to a member function getClientOriginalName() on a non-object

My Form: @extends('layouts.master') @section('content') <div id="admin"> <h2&g...

0 Likes
4 Replies
Solved
posted 10 years ago

One To Many relations

Hi I just cant wrap my head around One To Many Relations. They seem to never work for me. So i start...

0 Likes
0 Replies

Ordering 'Post's in a 'Category' based on sum() of 'Vote's

I have 3 models... Category, Post, and Vote In my category view, I am showing an index of all Posts...

0 Likes
0 Replies

Building queries with pivot table fields

I have a User model, and an Item model. Each Item has one Category, and each User has a "benlon...

0 Likes
3 Replies
Solved

Allow member to reset password (from profile -without using the reset password)

I have a form where a user can update several profile fields such as username, email, location, etc....

0 Likes
2 Replies
posted 10 years ago

Outputting a non keyed array from query?

$data = Img::with(array('size'=> function($query){ $query->select('title', 'width', 'img_id'...

0 Likes
0 Replies

Add an array to a Eloquent\Collection

Salam, I want to add some new elements to a Eloquent Collection with the add public function, but I...

0 Likes
2 Replies
posted 10 years ago

Eloquent query

Hi frnds, way to convert codeigniter code to laravel Class user{ function select_cond($userdata = ar...

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.