I want to show a successful message as notification in my home page when a new value is inserted into my database.
Controller
function insert(Request $request)
{
$teacher = new teacher;
$teacher->Teacher_name = $request->Teacher_name;
$teacher->School_name = $request->School_name;
$teacher->Date_of_Birth = $request->Date_of_Birth;
$teacher->save();
$teacher = teacher::find($request->id);
return back()->with('success', 'Data inserted Successfully');
}
View
<ul class="nav navbar-nav navbar-left">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><span
class="label label-pill label-danger count" style="border-
radius:10px;"></span> <span class="glyphicon glyphicon-bell"
style="font-size:18px;"></span></a>
<ul class="dropdown-menu">
</ul>
</li>
</ul>
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2P1B2Tz
via IFTTT
Aucun commentaire:
Enregistrer un commentaire