Support the ongoing development of Laravel.io →

4,311 Threads

posted 7 years ago

make an empty relation

hi, i would like to make an empty relation, is that possible? tried class Testmodel extends Model {...

0 Likes
0 Replies

Set table on model for get last record

I need to set dynamically the table name (extract from other database) and get the last record. This...

0 Likes
1 Replies
posted 7 years ago

Eloquent create method ignore the fillable attributes in laravel 5.4

i face a problem when i register a user through web service API project, and it was working but sudd...

0 Likes
4 Replies
Solved

Laravel 4.2 Elasticsearch - Failed to connect to localhost port 9200: Connection refused?

Windows 10, OpenServer, Laravel 4.2, Elasticsearch 1.0 Controller: public function searchUser()...

0 Likes
0 Replies

Elasticsearch, Laravel 4.2 ERROR - Unresolvable dependency resolving [Parameter #0 [ <required> $retries ]] in class Elasticsearch\Transport?

Wrapper namespace App\Services; use Elasticsearch\Client; class Elastic { protected $client;...

0 Likes
0 Replies
posted 7 years ago

how to use hasManyThrough without the default id field

table struct is apply_forms id form_number name apply_form_devices id apply_for...

0 Likes
1 Replies
posted 7 years ago

->count() and ->get()->last()

I have, $a = App\SomeModel::where('id', 1)->get()->last(); My model's table has 72 entries. $a...

0 Likes
3 Replies
Solved

Handle multi-level restful URL

Hi. I already done making this url but I want to know what is the best practice to handle multi leve...

0 Likes
5 Replies
Solved

Trailing data error in Carbon data from postgresql

Hi, outputing data from created_at field lavarel 5.4/postgresql 9.4 I got error: InvalidArgumentExce...

0 Likes
0 Replies

Authentication with email and phone in a separate table

First of all, sorry for my bad english, I will try my best to explain it. I'm using Laravel 5.4 and...

0 Likes
0 Replies
posted 7 years ago

Laravel Relation for different User types

I have a platform where I have Users that are a Shop, they can place Orders, and I have Users that a...

0 Likes
0 Replies
posted 7 years ago

Multiply search in key value table

I am using laravel-5.4 table: | item_id | option_id | value | |---------|-----------|-------| | 1...

0 Likes
0 Replies

General error: 1215 Cannot add foreign key constraint

Here are my migrations: photoset_categories class CreatePhotosetCategoriesTable extends Migration {...

0 Likes
5 Replies

add timestamps on multiple tables

how to add timetamps with default value on multiple tables using migrate

0 Likes
1 Replies
posted 7 years ago

Code review for improvement

Hi there! I have a bunch of accessor and I want to receive suggestions on how to improve it. public...

0 Likes
2 Replies
Solved

How to join a additional tables after pivot table join

I have a pivot table "show_user" with columns show_id, user_id in my App\User.php i have p...

0 Likes
1 Replies

setting rule for unique name on existing row

Hello, in laravel 5.4 setting rule for unique name like $rules = array( 'name' => 'r...

0 Likes
2 Replies

Eager Loading + Join

If I do this, I would be able to retrieve the images() for the item $items = Item::all(); foreach($i...

0 Likes
2 Replies

Create dropdown using lists() method to get two columns and combine them in final view

I was working with dropdowns and was thinking if it is possible to use lists() method to get two col...

0 Likes
4 Replies
Solved

Laravel 5.4, problem saving an associated model

i'm trying to save a new tvshow and it's episodes into the database with the following code but in t...

0 Likes
1 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.