Support the ongoing development of Laravel.io →

How to load JS/CSS files in Master Page 1 time and use them through all pages?

Hello! I have all <script></script> files loading in the Master Page When I change the c...

0 Likes
0 Replies

Check database column for specific value before insert

I have a column in database table Category called 'no_category' by default is 1 but if user choose '...

0 Likes
0 Replies

Laravel 5, route all, request syntax

Hello, i recently started to use laravel and can't figure out how to solve this route Route::g...

0 Likes
1 Replies
posted 9 years ago

How to add index for { $table->timestamps(); } ?

I wanna and the index for the { $table->timestamps(); } . For quick query the some time's recor...

0 Likes
1 Replies

Create role and permissions in laravel 5.2

How to create Role-based Permissions in laravel 5.2 ? can use Zizaco for this ? or else is there any...

0 Likes
3 Replies
posted 9 years ago

Undefined property: Illuminate\Database\Eloquent\Collection::$class_name

Hi, I'm new to Laravel framework. I'm not sure I understand how the Eloquent/Model/Database stuff wo...

0 Likes
1 Replies

Laravel 5 unit testing controllers with auth middleware

I'm trying to write some unit tests for my controllers in Laravel 5 The route is protected by the au...

0 Likes
6 Replies
Solved
posted 9 years ago

Relationship without foreign key

Hi there, I have a table called Users, and two tables called firstnames and lastnames, respectively....

0 Likes
2 Replies

Problem with hosting shared

Hi! I have a problem with this code in hosting shared, but works fine in localhost. this function re...

0 Likes
2 Replies
posted 9 years ago

Error when using Queue::after (v5.1.10)

I'm following the Laravel docs here: https://laravel.com/docs/5.1/queues#job-events and attempting t...

0 Likes
0 Replies

Problem with Login using socialite

I have used Socialite library for authentication through facebook and google. When i used it separat...

0 Likes
0 Replies
posted 9 years ago

Homestead/vagrant share settings, best practice?

Hi, We would like to use vagrant/homestead for our laravel project. we're working with 3 colleagues...

0 Likes
4 Replies
posted 9 years ago

error on this laravel.io site

my own profile, when logged in: http://laravel.io/user/BartHuis gives: Whoops, looks like something...

0 Likes
7 Replies
Solved

How to decrypt a particular model field when retrieving through hasMany relationship

I am retrieving a list of articles that belong to each blog of the current user like this: return $c...

0 Likes
3 Replies

3 level cascading dropdown list in Laravel 5.2

I am trying to do a 3 levels dynamic or dependent dropdown list. i managed to fix the first two and...

0 Likes
0 Replies

"php artisan queue:failed" in Homestead is using mysql not postgres, even though postgres is defined in .env

Hi all, I've got 5.1.6 running in Homestead with postgres set as the DB in my .env file. The entire...

0 Likes
2 Replies
posted 9 years ago

foreign keys, how to use it with fresh migrations?

Hi, What is the idea on setting up migrations with foreign keys as a fresh setup? so my idea is to b...

0 Likes
5 Replies
Solved

How to pass data to json from Database?

Hello, Here is my Row Query to get the data from database. $user = DB::table('users')->get(); I w...

0 Likes
7 Replies
Solved
posted 9 years ago

syntax to check a value in a if statement

Is the below if statement correct, where newQ and newP are values, and post_type is a variable :...

0 Likes
3 Replies
posted 9 years ago

string as foreign key laravel migration not working?

Hi, When i make a migration with a string as foreign key, it don't work, but with an int its working...

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.

© 2025 Laravel.io - All rights reserved.