Support the ongoing development of Laravel.io →

4,311 Threads

Save one to many relations without dublicates

Hello. I have One To Many relation ( One user with many pages ) i'm inserting user pages like this:...

0 Likes
5 Replies

Eloquent Saving and Rollback or Batch Save

Hi, I currently creating this somewhat complicated abstraction layer. is it possible to cancel or ro...

0 Likes
0 Replies

Zizaco/entrust - Need a Functions to Get a all Roles for single User

I have assigned multiple roles for a user and I ll need to function to get all the roles based on t...

0 Likes
0 Replies
posted 10 years ago

Inverse of "save" for an "hasMany" relationship.

Hi, I have, say, a Post object that belongsTo a User object. The User object hasMany Post objects. I...

0 Likes
4 Replies

preg_replace(): Parameter mismatch, pattern is a string while replacement is an array

I have a checklists table and an items table. The relationship between both is hasMany. A checklist...

0 Likes
1 Replies

which files to upload to server after composer dump-autoload locally

I´m having no access to run composer on my clients server - so what to do when I change my controlle...

0 Likes
2 Replies

Custom fields with JSON

Hi, I would like to customize the JSON which is returned by the index and show functions of the cont...

0 Likes
4 Replies

Eloquent Observation - "Cumulative" method chaining?

So, I had a pretty common need to generate a query against a table based on multiple column values....

0 Likes
0 Replies
posted 10 years ago

Eloquent with PHP 5.2

I want to use Eloquent outside of Laravel, but I need to be compatible with PHP 5.2. Which version s...

0 Likes
4 Replies
Solved

Quickstart: undefined variable error exception

Coming over from Kohana to try out Laravel. I'm using the Homestead vagrant box. Following the Quick...

0 Likes
1 Replies
posted 10 years ago

The $model returned by the create method of Model doesn't contain all attributes such as deleted_at

for example: $input = ['username'=>'abcd123']; $user = \User::create($input); $user attributes:...

0 Likes
4 Replies
Solved

In mysql.log only PREPARE, why?

I try run this code: $rows = DB::table(CustomerNumber::TABLE) ->join(NumberGroup::TABLE, functio...

0 Likes
0 Replies
posted 10 years ago

belongsToMany relationship and has('relation') ==> Has() don't work

Hi, When i use Has() to have only result where the other table is not empty, that don't work. I have...

0 Likes
0 Replies

Search based on provided input

Is there a clever way of composing an eloquent search where it only applies values sent thought and...

0 Likes
1 Replies

Eagerloader with no select *

I have the query like this $article = new Article(); $query = $article->with('user')...

0 Likes
3 Replies

Laravel controllers functions ?

Hello every one. I am trying to make a function in my controller public function new(){ return View:...

0 Likes
1 Replies

Laravel 4 - Too much logic in my view template?

Hello, I created a search functionality within my Laravel project - the user can search for teamname...

0 Likes
3 Replies
posted 10 years ago

Displaying 2400 records takes 28 seconds

Hi, I've got an application that keeps track of people visiting a festival. On one page we would lik...

0 Likes
4 Replies

Creating helper method for similar database query -- class name as variable variable?

I'm getting started with Laravel, and learning as I go. I'd like to know the best way to tackle this...

0 Likes
4 Replies
Solved

Eloquent + Object loading

Hello everyone, i have a new project where i developed a different way to manage sessions. So i crea...

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.