Support the ongoing development of Laravel.io →

4,606 Threads

No facade aliases in Laravel 5?

in 4.2 I could: $data['owners'] = DB::table('powners') etc and Session::put('logged', 'islogged');...

0 Likes
45 Replies
Solved

Querying based on Input. If input is empty, get all.

Hi ya, I have a calnedar (FullCalnedar) where the user can filter down results based on a few params...

0 Likes
1 Replies
Solved

Is there an "insertSetTimestamps" Method to update timestamps in Seeder

I have a lot of tables that use the $table->timestamps(); in the migration. When I build my seede...

0 Likes
3 Replies

Eloquent: get one by one

I have two table Users --- id --- username --- group_id Group -- id -- name I tried get all users a...

0 Likes
5 Replies
Solved
posted 10 years ago

Not able to delete a foreign key, what's going on?

I have the following migration: <?php use Illuminate\Database\Schema\Blueprint; use Illuminate\D...

0 Likes
1 Replies

Noob Question - Deleting records and validating

I have a record in my database that I am deleting with the value of ID. Currently I have this as a g...

0 Likes
2 Replies

preg_replace(): Parameter mismatch error

Hi I'm getting this error {"error":{"type":"ErrorException","mess...

0 Likes
5 Replies

'image upload' not writing to MySql database or public folder with Laravel 4.1 (with Croppa) on Fortrabbit

newbie alert! i’ve recently moved my Laravel site to Fortrabbit but when i post new images to the si...

0 Likes
4 Replies
Solved

Eloquent ORM Eager loading too eager

Hi, I`m trying to return only certain columns from the products table : <?php class Promo exten...

0 Likes
5 Replies

Advanced query using Eloquent

Given this model: I have defined all relationships properly using Eloquent ¿How can I get just ge...

0 Likes
4 Replies
Solved

Class 'Artisan' not found

Hello, I am currently following this Laracast: https://laracasts.com/lessons/test-databases-in-memor...

0 Likes
3 Replies

[Package] Laravel Custom Migrations

What is it Have you ever wished to create more than one type of migration? Did you ever want to run...

0 Likes
0 Replies

Adding a "reference table" to a pivot table

Hi guys at the moment I'm hardcoding in the 'unit' column on the 'ingredient_recipe' table. I want t...

0 Likes
3 Replies

MAMP mysql conflict with native MAC mysql

Hi all, i've a Mac and i'm running MAMP with virtualhost properly configured. the problem was mysql....

0 Likes
0 Replies

Laravel 4 - saving a hasMany relationship

I have the following relations: Discount: <?php class Discount extends Eloquent { pro...

0 Likes
2 Replies

Querying a many-to-many relationship

Hello, being new to Laravel, I'm trying to perform a query in Laravel 4's query builder or Eloquent....

0 Likes
3 Replies
Solved

Need variables

Hi, i have a select: $roles = agegroup::all(); The select delivers an object with data. Now i need t...

0 Likes
2 Replies
Solved

Why Laravel save data more then one record at one time?

I use Laravel Eloquent to save data to table store, but it save more then one record at one time. Wh...

0 Likes
1 Replies

I want to send my table schemas to the front-end using in json format. How can I get that schema?

Do I have to write a raw sql query? Or is there a class in laravel that can do that?

0 Likes
2 Replies
Solved

Find items that have a set of associated items through hasMany

I have three tables: Video (id, title) Tag (id, title) Video_Tag (id, video_id, tag_id) <-- join...

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.

© 2025 Laravel.io - All rights reserved.