Support the ongoing development of Laravel.io →

4,304 Threads

posted 7 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 8 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 7 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 7 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

[L5] Why it takes so long? Any suggestion better?

i have this code in my controller // 1 $header = DB::table('rekap_cmd')->select('date','uni...

0 Likes
1 Replies

Query between a db table an array

I wanna make a query like this. public function find(Request $request){ $dato=$request->buscarD...

0 Likes
1 Replies

Why Laravel converts field names in POST request and add unnecessary fields?

I am making POST request: http://localhost:8081/myserver/server.php/api/v1/contracts/1 with body {...

0 Likes
0 Replies

HasMany with Where in Scope

I want to do something like that, but laravels error says Unknown column 'assignable_table.assignabl...

0 Likes
3 Replies
Solved
posted 7 years ago

touching 2 way's between models

Hi, When i have a product model and a category model, i want them to touch both ways, but im getting...

0 Likes
6 Replies
posted 7 years ago

setting touch in eloquent model vs in the database?

Hi, Standard of eloquent is to set the touch in the model to update the updated_at timestamp. But yo...

0 Likes
2 Replies

Query builder not escaping quotes or backslashes correctly?

I have a searchbox users can use to search fields using the following query. (I've not copied in the...

0 Likes
0 Replies

Why aren't Eloquent $perPage and $table static properties?

I was wondering why the Eloquent properties $perPage and $table aren't static properties. It doesn't...

0 Likes
3 Replies
posted 7 years ago

models not in app/models folder when generaten by artisan?

https://laravel.com/docs/4.2/eloquent#basic-usage says: To get started, create an Eloquent model. Mo...

0 Likes
4 Replies

Decrement Each Value for get url acces

When i acces main?company_id in url of my site, i must do decrement -1 for row user , i try this : $...

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.