Search
 
SCRIPT & CODE EXAMPLE
 

PHP

laravel get post with comments

$post = Post::with('comments')->get()
Comment

how to get post by comment in laravel

public function getComment($id)
{   
    $post = Post::with('blogcomments')->find($id);
    return view('posts.show')->with('post', $post);
}
Comment

PREVIOUS NEXT
Code Example
Php :: php class 
Php :: how to update a table based on three columns laravel 
Php :: laravel relationship retrieve data 
Php :: php throw fatal error 
Php :: yajra datatables html column bulder example 
Php :: laravel vue pagination with search filter 
Php :: how to convert an array to uppercase before storing in database 
Php :: php/Laravel check if date is passed 
Php :: adding two numbers in php 
Php :: php pass a function as a parameter 
Php :: laravel echo 
Php :: send gmail 
Php :: route list laravel 8 
Php :: how to write php in script file 
Php :: how to create resource in laravel 
Php :: laravel showing index of problem 
Php :: global variable in laravel 
Php :: php pre 
Php :: get firstwod php 
Php :: drop column laravel migration 
Php :: how to create object in php 
Php :: php array_slice 
Php :: header in fpdi 
Php :: advanaced layout builder enfold custom post type 
Php :: how to convert amount in words in php 
Php :: enset laravel session 
Php :: digitalocean php as text 
Php :: File Open File Read File Close 
Php :: laravel count soft delete data 
Php :: php generator for mysql 
ADD CONTENT
Topic
Content
Source link
Name
9+6 =