app/Models/Post.phpCopy to clipboard namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Post extends Model
{
protected $fillable = [
'title',
'content'
routes/web.phpCopy to clipboard use App\Http\Controllers\PostController;
Route::resource('posts', [PostController::class, 'index']);
app/Http/Controllers/PostController.phpCopy to clipboard <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\Post;
class PostController extends Controller
{
resources/views/posts/show.blade.phpCopy to clipboard <!DOCTYPE html>
<html>
<head>
<title>{{ $post->title }}</title>
</head>
<body>
@include('template.partials.header')
<div class="content">