Support the ongoing development of Laravel.io →

4,313 Threads

How to set $fillable attributes for another table with hasOne relationship in a Laravel/Ardent model?

Suppose, I have these ardent models class User extends \LaravelBook\Ardent\Ardent { public $aut...

0 Likes
2 Replies
posted 8 years ago

Issue accessing Eloquent relationship model attributes.

I keep getting an error, "Trying to get property of non-object", when trying to access an...

0 Likes
0 Replies

PHP - Eloquent search on multiple tables no results

I am trying to build a search on my website (using the laravel 5.2). I need to search multiple table...

0 Likes
0 Replies
posted 8 years ago

Having problems getting values from foreach [laravel]

Hello Guys, trying to get id from each person $person = $request->input('person); //valu...

0 Likes
0 Replies

PDF file upload via form Laravel 5.2

Hello, I'm new here and quite new to Laravel. I've been trying to add a form that submits author, ti...

0 Likes
0 Replies

How to set primary key as array key for model and all its relations?

In Laravel all model values returns as simple list. Is it possible somehow set up primary key as arr...

0 Likes
1 Replies

Can't access final model (posts) through hasManyThrough method, error "Call to undefined method Illuminate\Database\Query\Builder::posts()"

I don't know what is wrong here. I have this kind of setup: item_model id - integer name - s...

0 Likes
20 Replies

Help with the eloquent query!!!

Here is my reddit post. Thanks!

0 Likes
0 Replies
posted 8 years ago

Change fillable attribute using parent constructor

Hi. Nice to be here. I have two classes. Profile and Student. Student extends Profile. There are oth...

0 Likes
0 Replies

Backpack for Laravel - create beautiful admin panels at blazing speed

Backpack for Laravel is now in public beta. Its philosophy is to provide the building blocks for you...

0 Likes
1 Replies
posted 8 years ago

Is it possible to Join an Eloquent Model with an Eloquent QueryBuilder query?

Here's my query - User::join(CallRequestRating::select('userid', DB::raw('avg(rating) AS ratingavera...

0 Likes
0 Replies

Remove white space between words in DB

HI all REally appreciate some help with this one if any one has time. I need to remove the white spa...

0 Likes
6 Replies
posted 9 years ago

Prefix schema on Eloquent Relationship queries

Hi, I'm working with PostgreSQL, and there is more than one schema on our database: mysystem - cont...

0 Likes
1 Replies

Join multiple tables Eloquent

I am trying to Join multiple tables and get results I have now 2 tables 1- projects_info (id - pro_t...

0 Likes
1 Replies
Solved

Collection filtering is slow, any tips?

I'm working on a website for a soccerteam where I dynamically generate the ranking by getting all th...

0 Likes
0 Replies
posted 8 years ago

Eloquent - Select catégories and count number of articles by catégorie

Hello, I am please inquire. With Laravel 5.1, I would get my list of categories, and count the numbe...

0 Likes
0 Replies

How to save multiple checkboxes in Laravel

Please i need some help in my application. I am using Laravel 4.2 and MySQL database. I am trying to...

0 Likes
2 Replies
posted 8 years ago

Task model

<?php namespace App; use Illuminate\Database\Eloquent\Model; class Task extends Model { p...

0 Likes
0 Replies

Multi-way Relationship?

Good day, I'm new to laravel and have been attempting to figure out how on earth to do a multi-way r...

0 Likes
2 Replies
Solved

Relating models using composite keys

I unfortunately need to import data from a third-party vendor and use their non-standard database sc...

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