To show a notification popup in the bottom right that the article has been saved, you can use a package like SweetAlert2. Here's an example of how you can use it in your controller method:
use RealRashid\SweetAlert\Facades\Alert;
public function update(Request $request, Article $article)
{
$article->update([
'body' => $request->input('body'),
]);
Alert::success('Success', 'Article updated successfully!');
return redirect()->back();
}
Make sure to install the SweetAlert2 package and import the Alert facade at the top of your controller file. The success method will display a success message with the title "Success" and the message "Article updated successfully!". The redirect()->back() method will redirect the user back to the edit screen.
You can customize the appearance and behavior of the notification popup by passing additional options to the success method. Check out the SweetAlert2 documentation for more information.