Support the ongoing development of Laravel.io →

4,311 Threads

in Laravel 4, i can't create data in another connection

the code can't create data UserToken::on('user')->create($token_data); result: {"error"...

0 Likes
0 Replies

use $query var as limit

select * from `prices` where `prices`.`item_id` in ('1', '2', '3') and `created_at` <= '2014-06-2...

0 Likes
0 Replies

Eloquent is everywhere

I'm learning DDD pattern and signle responsability and what not, and i found one thing that repeats...

0 Likes
0 Replies

Parameters in relationships referencing other relationships

I'm trying to limit the results from a relationship based on results in another relationship. Here's...

0 Likes
1 Replies

Printing out all tags (manytomany)

Hey guys. Still having a bit of a hard time learning the relationships ^^ So i wanna print out all t...

0 Likes
3 Replies

Create a 'static' function in a model

Hello all, I have some lookup tables in my project that contain some id => name values. For that...

0 Likes
0 Replies
posted 10 years ago

Laravel 4.2 relations with soft deletes

In 4.0 I could get soft deleted related models with the following relation public function student()...

0 Likes
6 Replies

foreign key not set up properly?

First, let me describe the conceptual behavior. I have two tables - a promotions table, containing t...

0 Likes
0 Replies

Model-specific Permissions Package

I'm looking for a permissions package that allows me to define a role and permissions on a user, but...

0 Likes
0 Replies

Filter not exist columns in Eloquent model

How can I modify the ~~~static::creating~~~ function to avoid "Column not found: 1054 Unknown c...

0 Likes
0 Replies
posted 10 years ago

Elequent - where pivot_field = something

Is ti posible to do something like this: Request::with('users')->where('pivot_status', '=', PENDI...

0 Likes
0 Replies

Eloquent set random not duplicate id when creating records

This is the code of my Eloquent model: protected static function boot() { parent::boot(); s...

0 Likes
2 Replies

Shortcut for if ($a->polyable_type == get_class($b) || $a->polyable_id == $b->id) ?

I'm wondering if Laravel has a shortcut function for this part of an if statement? if ($a->polyab...

0 Likes
0 Replies

Group result/collection by field

I'm pulling an actor from the database. In the actor's view I want to see a list of all movies my ac...

0 Likes
0 Replies

Binding/linking two users together

I'm building a unittest system. At some point I want to bind two users together in order to make an...

0 Likes
0 Replies

eloquent relationship validation

I have a Model "Houses" that has a location_id field so every record has a relationship wi...

0 Likes
1 Replies

What's the best / correct way to extend a model and structure the DB tables

Model Woman extends Homospaien Model Man extends Homosapien Table "homosapien" contains al...

0 Likes
1 Replies

SQLSTATE Syntax error when using Eloquent join

I'm very new to Laravel and MVC's in general (third day of using Laravel), so please bear with me. I...

0 Likes
2 Replies
Solved

Send file as a standard multipart form post

What is the best way to send a file as a multipart form programmatically with Laravel? I don't need...

0 Likes
0 Replies

saving permissions as json in Administrator for this error-> Cannot JSON_decode permissions [Admin]

0 down vote favorite I am using Administrator (frozennode) with Sentry . for permission part when I...

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.