Support the ongoing development of Laravel.io →

4,311 Threads

Can't get accessors to work

In my application I have numerous models, but the ones that are of concern are 'User' and 'Points'....

0 Likes
3 Replies

Get Recent Comments

Hey everyone, i'm pretty sure that my problem is already out there, but i wasn't able to find any so...

0 Likes
1 Replies
Solved

Escaping for injection

I am learning laravel and php but I just need to clarify when it is needed to escape strings. If any...

0 Likes
4 Replies
Solved
posted 9 years ago

Laravel orderBy using eager loading/functions

I have a Posts DB and a likes DB with the following structure: Posts Table: item_id Likes Table: ite...

0 Likes
2 Replies

Migration of databases

Hello Guys, On the database.php file it is possible to define a database(MySQL, sqlsrv, pgsql). If I...

0 Likes
3 Replies
Solved

Checking against multiple groups

Hello, I have Users who can belong to many Groups, and Issues which are assigned to a single Group....

0 Likes
0 Replies

Models for admin and page display

I'm learning Laravel 5. I have a model called Destination. I am querying the database with the model...

0 Likes
0 Replies

Eloquent hasOne best practice Laravel 5.0

Hello, #Laravel 5.0 Standart situations with html_meta table that contains some html meta data for...

0 Likes
5 Replies

eloquent query multiple relations deep

I have 3 models in question. Company, User, Group. I am trying to return all company records whose c...

0 Likes
4 Replies
Solved

Reusing code in Laravel 5

I am learning Laravel and am using Laravel 5. I have some standard reusable functions that I want to...

0 Likes
6 Replies

How to use basic class to render partials, please help

Hi Folks, I have some eloquent code I use throughout my controller to render a view, rather than kee...

0 Likes
1 Replies

Simple Search Engine

Hello, I am developing a simple search engine and I am having troubles with receiving the results co...

0 Likes
1 Replies

Test controller - why eloquent don't strip redundant input in tests (like password_confirmation)

Hey, I am starting with testing and right now I want to test my controller using phpunit. I have suc...

0 Likes
5 Replies

Display threads with order by post (like higher ID)

I'm building forum. But I need help about building the forum display page. <?php $teemad = DB::ta...

0 Likes
1 Replies
posted 10 years ago

How to set array key from column value

Hi! Is there a nice way to set array key by column value? Now I am doing it this way: $myArray = My...

0 Likes
2 Replies

DB + variables naming conventions

Hi everyone I've been searching this for a while, but couldn't find the specific subject So here is...

0 Likes
2 Replies
Solved

Laravel - filter by multiple relation values while keeping eloquent pagination

I have two models, Character and Tag, that are in many-to-many relationship. I'd like to be able to...

0 Likes
5 Replies
Solved
posted 10 years ago

Sorting by count of relationships

I have a system with users have countries. I have a view where I want to show a list of countries an...

0 Likes
3 Replies

RESTful controller's create-method and belongsTo relationship

What I'm looking for here, is an elegant way of creating a new Contact. As the image says, a Contac...

0 Likes
1 Replies
Solved

Putting Eloquent model into folders

Using Laravel 5, how do you put models into folders? Currently mine are sitting underneath the defau...

0 Likes
3 Replies
Solved

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.