// laravel 4
$list_categories_id = $post->categories->modelKeys();
// laravel 5
$list_categories_id = $post->categories->keys();
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community