Support the ongoing development of Laravel.io →

4,304 Threads

posted 5 years ago

Models propeties and where are they?

I'm new to Laravel. I am trying to understand if I create a model called Cat, and the cat has a prop...

0 Likes
3 Replies

ManyToMany Relationship With Third Table

Hi, Using Laravel 5.5 I am trying to design an incident management system which has bespoke requirem...

0 Likes
1 Replies
posted 5 years ago

sync() with where on the intermediary table

Hi, When using sync() a query like this is generated: update `course_group_course` set `year` = ? wh...

0 Likes
0 Replies

Laravel Search WHereHas JUST when has Value

Hello , I have a question . I want to search Tags ( Many to Many ) in My post , JUST if I select tho...

0 Likes
1 Replies
Solved
posted 6 years ago

how to change query type of eloquent with method

i use laravel and my db is sql server . when use with method on eloquent , it make a query has where...

0 Likes
1 Replies

Getting relation subquery

Hello! There is some problem with ordering eloquent query results by field from related table. Every...

0 Likes
1 Replies

Retrieving 5 million records from database and comparing

Hello Everyone, I have a requirement of retrieving 5 million records from MySQL database and compari...

0 Likes
4 Replies
Solved

Get all team members job sites if current user is the owner

Hello, i am plugging away at my app and i am required to have team owners to be able to edit / updat...

0 Likes
0 Replies

InvalidArgumentException: Unable to locate factory with name [default] [App\Company].

Here's what my very simple model looks like: <?php namespace App; use Illuminate\Database\Eloqu...

0 Likes
1 Replies

Как правильно составить запрос к базе?

Есть таблица produkts. У этой таблицы есть связи "многие ко многим" с 3 другими таблицами...

0 Likes
0 Replies

Convert an array of integer onto a Collection ... before map

I created this method : public function vcListAndSegmentCount() { $valuechainLists = Valuechain::sel...

0 Likes
0 Replies

Join interfering with eager loading

I'm going insane. I have a query that needs to use a join and eager loading. The join needs to occur...

0 Likes
2 Replies

Has many through update / with pivot laravel 5.5

I have several tables (all of them with softdeletes and timestamps : created_at , updated_at , delet...

0 Likes
0 Replies

Eloquent Relationships

I have two models MediaProfile and MediaProfilesContent. MediaProfile has many MediaProfilesContent...

0 Likes
8 Replies
Solved
posted 6 years ago

If a model is not persisted always thown an Exception?

When i create a model, for example with the Model::create() method its necesary to check if the mode...

0 Likes
0 Replies

Eloquent ORM: Eager Loading Error: 'Call to a member function addEagerConstraints() on a non-object'

Unit Model: namespace App\Models\Qualification; use Illuminate\Database\Eloquent\Model; class Unit...

0 Likes
2 Replies
Solved

Query bulding.

Hello, I started to learn Laravel and I have a problem. I want to query questions from the database...

0 Likes
0 Replies

Laravel Bootstrap SlideShow each slider eight product

I want each slideer has eight products <div class="carousel-inner hidden-xs" role="listbox">...

0 Likes
0 Replies
posted 6 years ago

Fetching and Displaying Customer Orders on Page

There are 3 tables. First one is orders: After example order: class Order extends Model { // Tab...

0 Likes
0 Replies
posted 6 years ago

SQL result != Eloquent result

$data = StoneType::with(['user'=>function($query){ // 每个取 2 条 return $query-&...

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.