Monday, 8 October 2018

Prevent back history.

Create a middleware named PreventBackHistory

and add the below lines.

<?php
namespace App\Http\Middleware;

use Closure;

class PreventBackHistory
{
    public function handle($request, Closure $next)
    {
        $response = $next($request);

        return $response->header('Cache-Control','nocache, no-store, max-age=0, must-revalidate')

            ->header('Pragma','no-cache')

            ->header('Expires','Sun, 02 Jan 1990 00:00:00 GMT');
    }
}


Now Open the kernal.php.
Find  protected $routeMiddleware and add below line.

'prevent-back-history' => \App\Http\Middleware\PreventBackHistory::class,

In your route.php file write these lines.

Route::group(['middleware' => 'prevent-back-history'],function()
{

*********** Write your route files here. example************
           Route::get('/home', 'HomeController@index')->name('home');

});


Machine Learning - Potato Leaf Disease Prediction

Step 1: import numpy as np import pandas as pd import splitfolders import matplotlib.pyplot as plt import tensorflow as tf from tensorflow i...