Support the ongoing development of Laravel.io →

4,311 Threads

how to ensure sequence of integers

I have a table with categories: string: label integer: order I wish for order to be a continuous lis...

0 Likes
0 Replies

Model::create SQL Insert Error

Hi, when i try to create/insert a new Model instance with $maintenance = Maintenance::create(array(...

0 Likes
0 Replies
posted 8 years ago

How do I get the last inserted id (PDO::lastInsertId)?

public function createComment(Request $request) { $comment = new Comment();...

0 Likes
2 Replies
Solved

Laravel and Vue.JS Many-to-Many with multiple arguments?

Hi! I'm with a problem, due to my lack of ideas and experience... And I hope you guys can help me! I...

0 Likes
0 Replies

Custom pivot as a model, how to and best practices?

Hello, I have been searching and trying for a week now without success, so here I post my first ques...

0 Likes
0 Replies

Custom Relationship Queries

Does anyone know of a good way to either add a column to a relationship query, or use a custom query...

0 Likes
1 Replies
posted 8 years ago

eloquent query problem in array

#employeelogs table #id.........emp_id...........obcode ##1...........1................OB-MIS-00001...

0 Likes
2 Replies
Solved

Group Eloquent query by column, order by another

Hey guys ! My question today is very simple. I have an employees table containing a type_id column a...

0 Likes
4 Replies
Solved
posted 8 years ago

Eloquent Inverse Relationship Method Undefined

I have two models. My first one is: <?php namespace App; use Illuminate\Database\Eloquent\Model;...

0 Likes
0 Replies
posted 8 years ago

How to call each other Repository

How to call each other Repository. class PostRepository { } class UserRepository { } PostRepositor...

0 Likes
0 Replies

Laravel 5.1 MassAssignmentException After Model $fillable Update

Greetings. I am having trouble with a MassAssignmentException. I was following along Jeffrey Way's v...

0 Likes
12 Replies
posted 8 years ago

Constraining whereHas query to only the latest in relationship?

I have a table auctions with a column start_amount with a one-to-many relationship to another table...

0 Likes
0 Replies
posted 8 years ago

hasMany relation with ::where() ???

HI Community, im just getting started with Laravel and Eloquent. I'm watching the Laracasts and I'm...

0 Likes
3 Replies
Solved

it's possible to create a new database in laravel?(developers way)

i need to create custom command for create a new database in laravel? ex $php artisan Database Data...

0 Likes
1 Replies

[Package] Query Filters - Filter data based on the query string of HTTP requests

Package fully inspired by this Laracasts lesson: https://laracasts.com/series/eloquent-techniques/ep...

0 Likes
0 Replies
posted 8 years ago

Laravel yajra datatables showing json response on the browser

Hi I'm using yajra datatables for Laravel 5 it was returning a json response but showing that respon...

0 Likes
0 Replies
posted 8 years ago

How do I check if this object is empty?

This is my route Route::get('/customer/{name}', function($name){ $name = strtolower($name); $custo...

0 Likes
2 Replies
Solved
posted 8 years ago

Failed calling Illuminate\Database\Eloquent\Collection::jsonSerialize()

I have trying to convert two laravel collections in to string using json_encode($collection_array),...

0 Likes
0 Replies

Pull Associated Data

I am trying to pull relationship data in the same query. I have the hasMany and belongsTo set in eac...

0 Likes
0 Replies

Form Model Binding, (Many to Many) Polymorphic Relations and sync()

Hello community, I am Laravel newbie, so please, be patient with me. My tables: artists - id - name...

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.