app/Http/Controllers/MlDatasetController.php
/**
	 * Determine if the session and input CSRF tokens match.
	 *
	 * @param \Illuminate\Http\Request $request
	 * @return bool
	 */
Determine if the session and input CSRF tokens match.
@param \Illuminate\Http\Request $request
@return bool
Determine if the session and input CSRF tokens match . @param \ Illuminate \ Http \ Request $request @return bool
protected function tokensMatch($request) {
		$token = $request->ajax() ? $request->header('X-CSRF-Token') : $request->input('_token');
		return $request->session()->token() == $token;
	}
protected function tokensMatch ( $ request ) { $ token = $ request -> ajax ( ) ? $ request -> header ( 'X-CSRF-Token' ) : $ request -> input ( '_token' ) ; return $ request -> session ( ) -> token ( ) == $ token ; }
Determine if the session and input CSRF tokens match.
Determine if the session and input CSRF tokens match .
// If request is an ajax request, then check to see if token matches token provider in // the header. This way, we can use CSRF protection in ajax requests also.