Session Create in laravel

Controller: $request->session()->put('key', 'value'); $langs = session('langs'); echo $langs; if ($request->session()->has('key')) {   $langs = session('langs'); echo $langs; } View: @if(!empty(Session::get('userid'))) <form method="POST" action="{{ route('logout') }}"> @csrf <button type="submit" class="btn btn-danger">…

0 Comments

Localization in laravel

1. Goto resources / lang. 2. Create a file inside lang / en / lang.php (suppose). 3. You can create a folder of language also. => lang.php <?php return […

0 Comments

php – ajax data insert

This tutorial is posted for beginners as well as experienced developers. It will help you insert form data into the MySQL Database without page refresh. <body> <!– form start –>…

0 Comments

setTimeout() in javascript and trigger click event

const myTimeout = setTimeout(myGreeting, 5000); function myGreeting() { alert('hi'); } <input type='button' name='osx' value='Demo' class='osx demo' runat="server" /> <script> $("document").ready(function () { window.getElementById("osx").click(); }); </script> <script> window.addEventListener('load', function () {…

0 Comments

Where and Limit Condition in php

The WHERE Clause is used to filter only those records that are fulfilled by a specific condition given by the user. in other words, the SQL WHERE clause is used to restrict…

0 Comments