This may be a duplicate of other questions regarding javascript detection you may find your answer here. From a google search I found something on github that may be of some use link. It seems to support checking for javascript support. It may be using the same technique found in the stackoverflow link I showed you.
The manual way can be done by redirecting to a cookie pickup like so
index.php
<?php
if(isset($_COOKIE["javascript_checked"]))
{
$GLOBALS["javascript_enabled"] = isset($_COOKIE["javascript_enabled"]) ? true : false;
}
else
{
setcookie("javascript_check_original_request", "http://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"], time()+3600);
header("Location: http://" . $_SERVER["HTTP_HOST"] . "/detectjs.php.php");
exit;
}
var_dump($GLOBALS["javascript_enabled"]); // prints out the result
detectjs.php
<?php
setcookie("javascript_checked", "true", time()+3600);
?>
<meta http-equiv="refresh" content="1;url=<?php echo $_COOKIE["javascript_check_original_request"]; ?>" />
<script type="text/javascript">
/**
* A function to simplify the process of creating a cookie
* @param string name
* @param string value
* @param int days
*/
function createCookie(name,value,days) {
if (days)
{
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}
createCookie("javascript_enabled", "true", 1); // creates a cookie that says javascript is enabled for 1 day
</script>
This will check for a cookie to see if the cookie pickup has happened, if it hasn't then it will redirect to a page that sets the cookie that the cookie pickup has happened and if javascript is enabled then the javascript will create a cookie that states it is enabled. it will then redirect back to the original request so that the user wouldn't notice a difference besides a second delay that it takes for the detectjs script to redirect back to the original request.
now that the check has been done, php can store a boolean into the $GLOBALS variable that contains a boolean for if javascript is enabled or not. You can reference this in any php file in laravel to make decisions if javascript is enabled or not using
if($GLOBALS["javascript_enabled"])
{
}
else
{
}
This can easily be done manually with the process above but if you want to use that laravel library I linked, more power to you.