file_put_contents(C:\xampp\htdocs\exam_system\storage\framework/sessions/FF): failed to open stream: No such file or directory => Soled this Error

Step 1: type your TERMINAL this Command

composer update

Step 2: type your TERMINAL this Command

php artisan r:clear

Step 3: type your TERMINAL this Command

php artisan v:clear

Step 4: type your TERMINAL this Command

php artisan c:Cache

Now is your Project is Running

Tagged : / / /

JavaScript Cheat Sheet — JSON, Loops, and Promises

JavaScript is one of the most popular programming languages for web programming.

In this article, we’ll look at the basic syntax of modern JavaScript


We can create JSON strings from JavaScript objects with the JSON.stringify method:

And we can convert JSON strings back to JavaScript objects with JSON.parse :

const obj = JSON.parse(json);

We can use it to store data in local storage.

We’ve to convert objects into strings first to store them.

To store objects we call localStorage.setItem :

The first argument is the key.

And we can get data by their keys with getItem :



avaScript comes with various kinds of loops.

One kind of loop is the for loop:

for (let i = 0; i < 10; i++) { console.log(i); }

We can loop through any kind of iterable object with the for-of loop:

for (let i of custOrder) { console.log(i); }

Some iterable objects include arrays, strings, and node lists.

Another kind of loop is the while loop:

There’s also the do-while loop:

The break keyword lets us end the loop early:

The continue keyword lets us skip to the next iteration:

Data Types

JavaScript comes with various data types.

They include:


We can create an object with curly braces:

It has properties and methods.

this is the student object itself.

We can call fullName with student.fullName() .

And we can assign values to properties with:

student.age = 19;


We can create promises with the Promise constructor:

We can resolve to fulfill the promise with the sum.

And we call reject to reject the promise with an error.

Then we can call then to get the resolved value and catch to get the error values:


We can work with JSON, local storage, promises, and loops with JavaScript.

Tagged : / / /

CRUD Operations in Laravel using ajax

Step 1 – Install Laravel 5.8

First we want to Download Laravel 5.8 version for developing Crud application using Ajax. For this you have to open your terminal or command prompt and write below command. It will download Laravel 5.8 in your define directory.

composer create-project laravel/laravel=5.8 ajax-crud –prefer-dist

Step 2 – Laravel 5.8 Database Connection

Once Laravel 5.8 has been downloaded then after we have to make Database connection. For this first you have to open config/database.php and define Mysql Database configuration.

After this you have to open .env file and in that file also you have to define Mysql Database configuration, which you can find below.

Step 3 – Create Table

For Create Crud Application, first we have to create Mysql table. For create Mysql table from Laravel 5.8 application we have to write following artisan command in your command prompt.

php artisan make:migration create_ajax_cruds_table –create=ajax_cruds

Above command will command create migration file in database/migrations folder. In that file we have to define table column which you want to define in Mysql table. Below you can find source code of migration file.

Lastly for create Mysql table in your Database, you have to write following command in your terminal or command prompt. It will create ajax_cruds table in your define Database.

php artisan migrate

Step 4 – Create Model in Laravel 5.8

Now we want to make Model in Laravel 5.8, For this you have to write following command in your terminal or command prompt. It will create model file here app/AjaxCrud.php.

php artisan make:model AjaxCrud -m

Under this app/AjaxCrud.php file, you have to define table column for database operation which source code you can find below.

Step 5 – Create Blades Files

For display output data in browser, in Laravel 5.8 we have to create blade file in resources/views folder. Under this folder we have create ajax_index.blade.php file. In this file you can find HTML code and jQuery code for display data in jQuery Datatable.

Step 6 – Set Resource Route

Step 7 – Create Controller in Laravel 5.8

Lastly, We need to set resource route for ajax crud application. For this we have to open routes/web.php file.

Controller mostly used for handle HTTP request. Create new controller in Laravel 5.8 framework, we have to write following command.

php artisan make:controller AjaxCrudController –resource

This command will create AjaxCrudController.php file in app/Http/Controllers folder. In this controller file you can find all in build required method for do Crud operation. Under this controller for use AjaxCrud model, first we have to define use App\AjaxCrud; this statement at the header of the AjaxCrudController.php file.

index() – This is the root method of this controller. This method will received Ajax request for load data in jQuery DataTables plugin. If this method received ajax request then it will load data in jQuery DataTables plugin. In this ajax block you can find yajra datatables package code.

store() – For Insert Data into Mysql table using ajax in Laravel 5.8, here we have use store() method of AjaxCrudController.php. This method will received Ajax request for insert or add data. Under this method first it has validate for data. If there is any validation fails then it will send response to ajax request in JSON format. But there is no any validation fails then it will continue execution of code and first it will upload profile image of user and then after it will insert data into mysql table. And lastly it will send json response to ajax request.

edit() – This method is used for fetch single row of data from mysql table, and send data to ajax request in json formate which will be display under Bootstrap modal form.

update() – This method has received ajax request for update existing mysql table data. In this method first it check user has select profile image or not. If User is select image then in this method it will validate form data with selected file is image or not. But Suppose user has not select image then it will only validate textbox data only. If there is any validation error occur then it will send data to ajax request in json formate. After successfully validate form data then it will update data.

destroy() – For delete or remove mysql data, ajax request will be send to destroy() method. It will delete or remove mysql data in Laravel 5.8 by using ajax.

For run Laravel 5.8 application, you can write following command.

php artisan serve

For see Laravel 5.8 application in your browser, you have to write following url.

Tagged : / / / /

ERROR: Unable to store image in particular directory

today when i storing image then one error appears

Solution:I have given permission to that directory folder public folder after that my issue is resolved

chmod -R 777 ./public


Tagged : /

How to fix syntax error or access violation while use Group by

above error appear if you apply groupby in controller function is given below figure

Solution 1:In config/database.php at “mysql” change : ‘strict’ => true, to false

reference :

now Your bug resolved

Tagged : /

How to add multiple image using Laravel Microservice

Step 1: take input image name as array and write multiple in blade file

Step 2:store data using ajax

Step 3: set routing

Route::prefix(‘/touroperator’)->group(function () use ($namespace) {

$controller = $namespace.'\TourDashboardController';
$tourcontroller = $namespace.'\TourDetailController';

Route::post(‘addimage/{email}’, “$tourcontroller@addsimage”);


Step 4: In client side controller create function to get access token

take a variable as array and pass inside for loop and all the data pass inside for loop till no of image selected

Step 5: set env and app config file


Step 6: Set routing in server side

Route::post(‘/addimagedetail’, ‘Admin\AdminTPController@storeimages’);

Step 7: apply bussiness query logic in server side controller

Finally our output looks like

Tagged : /

How to filter data using country,state and city dropdown in microservice

Step 1: create dropdown div block in blade file

Step 2: write jQuery key up and change function

Step 3:pass URL in ajax function for client side microservice

step 4: set routing

$tourcontroller = $namespace.’\TourDetailController’;

Step 5: write function in client side controller

Step 6: set env and app.php to connect between client and serverside for microservice


Step 7: Set routing server side

Route::get(‘gettripdetail/{email}’, ‘Admin\AdminTPController@tripdetail’);

Step 8: create function in server side controller

now run finally project

Tagged : /

How to Store Data in Pop-Modal in Laravel

In this tutorial I’m going to describe how to store data in bootstrap 4 pop modal in laravel.

composer create-project laravel/laravel employee "5.8"

Step 2-> Go to .env and set up connect with database


3rd step migrate table

php artisan migrate

Next create migration table as name of employees lets go and create table

php artisan make:migration create_employees_table

Next got to database/migration/create_emoloyees_table and open this file

Simply copy and paste this code


use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateEmployeesTable extends Migration
* Run the migrations.
* @return void
public function up()
Schema::create('employees', function (Blueprint $table) {

* Reverse the migrations.
* @return void
public function down()

Php artisan migrate

Next step create view files in resourses/views/
folder name


Go to empmodel.blade.php and paste below code

<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">

<link rel="stylesheet" href="" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">

{{-- model start here --}}

<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Add Employee Detail</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
<form action="{{ action('EmployeeController@store')}}" method="POST">
{{ csrf_field() }}
<div class="modal-body">

<div class="form-group">
<label>First Name</label>
<input type="text" name="fname" class="form-control" placeholder="Enter first name">

<div class="form-group">
<label>Last Name</label>
<input type="text" name="lname" class="form-control" placeholder="Enter last name">

<div class="form-group">
<input type="text" name="email" class="form-control" placeholder="Enter email">

<div class="form-group">
<input type="text" name="address" class="form-control" placeholder="Enter address">

<div class="form-group">
<input type="text" name="mobile" class="form-control" placeholder="Enter mobile">

<button type="submit" class="btn btn-primary">Submit</button>

{{-- model end here --}}

<div class="container">
<h1>Store Data in Pop-modal in laravel</h1>

@if (count($errors) >0)
<div class="alert alert-danger">
@foreach($errors->all() as $error)


@if (\Session::has('success'))
<div class="alert alert-success">
<p>{{ \Session::get('success') }}</p>


<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">
Add Employee

{{-- pop model start here --}}

<!-- Button trigger modal -->
{{-- <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">
Launch demo modal
</button> --}}

<!-- Modal -->

{{-- pop model end here --}}
<script src="" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>

Lets next go to create model

php artisan make:model Employee

Go to Employee model and paste below code


namespace App;

use Illuminate\Database\Eloquent\Model;

class Employee extends Model

Next create controller

php artisan make:controller EmployeeController -r

Go to EmployeeController and paste below code


namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Employee;

class EmployeeController extends Controller
* Display a listing of the resource.
* @return \Illuminate\Http\Response
public function index()
return view('empmodel');

* Show the form for creating a new resource.
* @return \Illuminate\Http\Response
public function create()

* Store a newly created resource in storage.
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
public function store(Request $request)
'fname' => 'required',
'lname' => 'required',
'email' => 'required',
'address' => 'required',
'mobile' => 'required',

$emps = new Employee;

$emps->fname = $request->input('fname');
$emps->lname = $request->input('lname');
$emps->email = $request->input('email');
$emps->address = $request->input('address');
$emps->mobile = $request->input('mobile');

return redirect('/employee')->with('success', 'Data saved');


* Display the specified resource.
* @param int $id
* @return \Illuminate\Http\Response
public function show($id)

* Show the form for editing the specified resource.
* @param int $id
* @return \Illuminate\Http\Response
public function edit($id)

* Update the specified resource in storage.
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
public function update(Request $request, $id)

* Remove the specified resource from storage.
* @param int $id
* @return \Illuminate\Http\Response
public function destroy($id)

Next create route go to Route/web.php and paste below code


| Web Routes
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!

Route::get('/', function () {
return view('welcome');


next go to browser and search

Now Form is look like this

Fill all the field and click on submit

Next Go to Localhost/phpmyadmin and check your data has been successfully saved


How to fix fatal error: Maximum execution time of 300 seconds exceeded in XAMPP

Step1: Go to this path C:\xampp\phpMyAdmin\libraries

Step2: open file config.default.php

Step3: config.default.php on this line $cfg[‘ExecTimeLimit’] = 300; change

Step4: config.default.php on this line $cfg[‘ExecTimeLimit’] = 0; change

Step5: XAMPP Will be Restart and Import the Sql file.

Tagged : /