Hands On: Community Contributions | Episode 2 - Display Community Links
Hi guys, in my CommunityLinksController when I want to fetch the data from the database to my $links variable it returns a pagination with an empty collection of items. (I did dd($links) to observe it)
In the video it starts from 2min07s to the expected result at 5min02s
Ofc I defined the CommunityLink factory and edited the views/community/index.blade.php.
hey @soso-_- can you post the code your having trouble with, I'm having a hard time understanding what your problem is exactly. Is the problem that the $links variable your passing from your controller to your view is empty when you feel it shouldn't be. please use the
``` code goes here syntax ```
to post your model code, controller code and view, and even the factory. You may want to directly check your database community_links table if that what you named it to make sure there is data in it.
Hum... Ok, in fact I found that "The database configuration for your application is located at config/database.php. In this file you may define all of your database connections, as well as specify which connection should be used by default."
So, the problem is solved. I needed to configurate the database as shown above.