Home > PHP Framework > Laravel > Two ways to get all comments of the current article in Laravel

Two ways to get all comments of the current article in Laravel

藏色散人
Release: 2020-11-05 15:54:20
forward
2120 people have browsed it

The following is the Laravel tutorial column to introduce two kinds of Laravel to get the current article. All comments, I hope it will be helpful to friends in need!

Two ways to get all comments of the current article in Laravel

1. The first method

use model appends attribute

Two ways to get all comments of the current article in Laravel

  1. Second type

Model association

Two ways to get all comments of the current article in Laravel

##

The above is the detailed content of Two ways to get all comments of the current article in Laravel. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Composer cannot install laravel
From 1970-01-01 08:00:00
0
0
0
Laravel Space/laravel-backup cannot be installed
From 1970-01-01 08:00:00
0
0
0
Laravel 5.1 Login laravel comes with it No more
From 1970-01-01 08:00:00
0
0
0
Why thinkphp has better performance than laravel?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template