Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel get data from multiple tables

use AppModelsPost;

$comments = Post::find(1)->comments;

foreach ($comments as $comment) {
    //
}
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #laravel #data #multiple #tables
ADD COMMENT
Topic
Name
7+4 =