Comments + 1N relations
This commit is contained in:
@@ -39,6 +39,8 @@ class BilletController extends Controller
|
||||
public function show(Billet $billet)
|
||||
{
|
||||
//
|
||||
$commentaires = $billet->commentaires;
|
||||
return view('vBillet', compact('billet', 'commentaires'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
66
laravel/app/Http/Controllers/CommentaireController.php
Normal file
66
laravel/app/Http/Controllers/CommentaireController.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Http\Requests\StoreCommentaireRequest;
|
||||
use App\Http\Requests\UpdateCommentaireRequest;
|
||||
use App\Models\Commentaire;
|
||||
|
||||
class CommentaireController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(StoreCommentaireRequest $request)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*/
|
||||
public function show(Commentaire $commentaire)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit(Commentaire $commentaire)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(UpdateCommentaireRequest $request, Commentaire $commentaire)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy(Commentaire $commentaire)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user