chore(app): mises a jour applicatives et normalisation du code (Laravel Pint)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -12,6 +12,7 @@ class EmotionController extends Controller
|
||||
public function index()
|
||||
{
|
||||
$records = EmotionRecord::where('user_id', Auth::id())->latest()->get();
|
||||
|
||||
return view('emotions.index', compact('records'));
|
||||
}
|
||||
|
||||
@@ -20,14 +21,14 @@ class EmotionController extends Controller
|
||||
$request->validate([
|
||||
'emotion' => 'required|string',
|
||||
'intensity' => 'required|integer|min:1|max:5',
|
||||
'note' => 'nullable|string'
|
||||
'note' => 'nullable|string',
|
||||
]);
|
||||
|
||||
EmotionRecord::create([
|
||||
'user_id' => Auth::id(),
|
||||
'emotion' => $request->emotion,
|
||||
'intensity' => $request->intensity,
|
||||
'note' => $request->note
|
||||
'note' => $request->note,
|
||||
]);
|
||||
|
||||
return redirect()->back()->with('success', 'Émotion enregistrée');
|
||||
|
||||
Reference in New Issue
Block a user