Search for threads and articles
Quickly access threads and articles by running a global search.
No results found
We couldn’t find anything with that term. Please try again.
// laravel 4
$list_categories_id = $post->categories->modelKeys();
// laravel 5
$list_categories_id = $post->categories->keys();
$list_categories_id = $post->categories->lists('id');
keys() is better because your primary key might not be "id"
Sign in to participate in this thread!
Your banner here too?
We'd like to thank these
for supporting us
Your logo here?
The Laravel portal for problem solving, knowledge sharing and community building.