Drag and Drop Upload uses Dropzone.js in Laravel 5.3 - laravel

An error occurred after "Adding Image" or "Drag and Drop" an image. Also, it's not uploaded into the destination folder.
Upload Error Code:
<html> <head> <meta charset="UTF-8"/> <meta name="robots" content="noindex,nofollow"/> <style> /* Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.com/yui... */ html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:text-top;}sub{vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}input,textarea,select{*font-size:100%;}legend{color:#000;} html { background: #eee; padding: 10px } img { border: 0; } #sf-resetcontent { width:970px; margin:0 auto; } .sf-reset { font: 11px Verdana, Arial, sans-serif; color: #333 } .sf-reset .clear { clear:both; height:0; font-size:0; line-height:0; } .sf-reset .clear_fix:after { display:block; height:0; clear:both; visibility:hidden; } .sf-reset .clear_fix { display:inline-block; } .sf-reset * html .clear_fix { height:1%; } .sf-reset .clear_fix { display:block; } .sf-reset, .sf-reset .block { margin: auto } .sf-reset abbr { border-bottom: 1px dotted #000; cursor: help; } .sf-reset p { font-size:14px; line-height:20px; color:#868686; padding-bottom:20px } .sf-reset strong { font-weight:bold; } .sf-reset a { color:#6c6159; cursor: default; } .sf-reset a img { border:none; } .sf-reset a:hover { text-decoration:underline; } .sf-reset em { font-style:italic; } .sf-reset h1, .sf-reset h2 { font: 20px Georgia, "Times New Roman", Times, serif } .sf-reset .exception_counter { background-color: #fff; color: #333; padding: 6px; float: left; margin-right: 10px; float: left; display: block; } .sf-reset .exception_title { margin-left: 3em; margin-bottom: 0.7em; display: block; } .sf-reset .exception_message { margin-left: 3em; display: block; } .sf-reset .traces li { font-size:12px; padding: 2px 4px; list-style-type:decimal; margin-left:20px; } .sf-reset .block { background-color:#FFFFFF; padding:10px 28px; margin-bottom:20px; -webkit-border-bottom-right-radius: 16px; -webkit-border-bottom-left-radius: 16px; -moz-border-radius-bottomright: 16px; -moz-border-radius-bottomleft: 16px; border-bottom-right-radius: 16px; border-bottom-left-radius: 16px; border-bottom:1px solid #ccc; border-right:1px solid #ccc; border-left:1px solid #ccc; word-wrap: break-word; } .sf-reset .block_exception { background-color:#ddd; color: #333; padding:20px; -webkit-border-top-left-radius: 16px; -webkit-border-top-right-radius: 16px; -moz-border-radius-topleft: 16px; -moz-border-radius-topright: 16px; border-top-left-radius: 16px; border-top-right-radius: 16px; border-top:1px solid #ccc; border-right:1px solid #ccc; border-left:1px solid #ccc; overflow: hidden; word-wrap: break-word; } .sf-reset a { background:none; color:#868686; text-decoration:none; } .sf-reset a:hover { background:none; color:#313131; text-decoration:underline; } .sf-reset ol { padding: 10px 0; } .sf-reset h1 { background-color:#FFFFFF; padding: 15px 28px; margin-bottom: 20px; -webkit-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px; border: 1px solid #ccc; } </style> </head> <body> <div id="sf-resetcontent" class="sf-reset"> <h1>Whoops, looks like something went wrong.</h1> <h2 class="block_exception clear_fix"> 1/1 <abbr title="Symfony\Component\Debug\Exception\FatalThrowableError">FatalThrowableError</abbr> in ImageRepository.php line 18: Access to undeclared static property: App\Image::$rules </h2> <div class="block"> <ol class="traces list_exception"> <li> in ImageRepository.php line 18</li> <li>at <abbr title="App\Logic\Image\ImageRepository">ImageRepository</abbr>->upload(array('_token' => '0tyWiynSc7MLXoUKIdFsUGRlGEJONb4DmPuTxIBJ', 'file' => object(<abbr title="Illuminate\Http\UploadedFile">UploadedFile</abbr>))) in ImageController.php line 25</li> <li>at <abbr title="App\Http\Controllers\ImageController">ImageController</abbr>->postUpload()</li> <li>at <abbr title=""></abbr>call_user_func_array(array(object(<abbr title="App\Http\Controllers\ImageController">ImageController</abbr>), 'postUpload'), array()) in Controller.php line 55</li> <li>at <abbr title="Illuminate\Routing\Controller">Controller</abbr>->callAction('postUpload', array()) in ControllerDispatcher.php line 44</li> <li>at <abbr title="Illuminate\Routing\ControllerDispatcher">ControllerDispatcher</abbr>->dispatch(object(<abbr title="Illuminate\Routing\Route">Route</abbr>), object(<abbr title="App\Http\Controllers\ImageController">ImageController</abbr>), 'postUpload') in Route.php line 189</li> <li>at <abbr title="Illuminate\Routing\Route">Route</abbr>->runController() in Route.php line 144</li> <li>at <abbr title="Illuminate\Routing\Route">Route</abbr>->run(object(<abbr title="Illuminate\Http\Request">Request</abbr>)) in Router.php line 642</li> <li>at <abbr title="Illuminate\Routing\Router">Router</abbr>->Illuminate\Routing\{closure}(object(<abbr title="Illuminate\Http\Request">Request</abbr>)) in Pipeline.php line 53</li> <li>at <abbr title="Illuminate\Routing\Pipeline">Pipeline</abbr>->Illuminate\Routing\{closure}(object(<abbr title="Illuminate\Http\Request">Request</abbr>)) in SubstituteBindings.php line 41</li> <li>at <abbr title="Illuminate\Routing\Middleware\SubstituteBindings">SubstituteBindings</abbr>->handle(object(<abbr title="Illuminate\Http\Request">Request</abbr>), object(<abbr title="Closure">Closure</abbr>)) in Pipeline.php line 137</li> <li>at <abbr title="Illuminate\Pipeline\Pipeline">Pipeline</abbr>->Illuminate\Pipeline\{closure}(object(<abbr title="Illuminate\Http\Request">Request</abbr>)) in Pipeline.php line 33</li> <li>at <abbr title="Illuminate\Routing\Pipeline">Pipeline</abbr>->Illuminate\Routing\{closure}(object(<abbr title="Illuminate\Http\Request">Request</abbr>)) in VerifyCsrfToken.php line 65</li> <li>at <abbr title="Illuminate\Foundation\Http\Middleware\VerifyCsrfToken">VerifyCsrfToken</abbr>->handle(object(<abbr title="Illuminate\Http\Request">Request</abbr>), object(<abbr title="Closure">Closure</abbr>)) in Pipeline.php line 137</li> <li>at <abbr title="Illuminate\Pipeline\Pipeline">Pipeline</abbr>->Illuminate\Pipeline\{closure}(object(<abbr title="Illuminate\Http\Request">Request</abbr>)) in Pipeline.php line 33</li> <li>at <abbr title="Illuminate\Routing\Pipeline">Pipeline</abbr>->Illuminate\Routing\{closure}(object(<abbr title="Illuminate\Http\Request">Request</abbr>)) in ShareErrorsFromSession.php line 49</li> <li>at <abbr title="Illuminate\View\Middleware\ShareErrorsFromSession">ShareErrorsFromSession</abbr>->handle(object(<abbr title="Illuminate\Http\Request">Request</abbr>), object(<abbr title="Closure">Closure</abbr>)) in Pipeline.php line 137</li> <li>at <abbr title="Illuminate\Pipeline\Pipeline">Pipeline</abbr>->Illuminate\Pipeline\{closure}(object(<abbr title="Illuminate\Http\Request">Request</abbr>)) in Pipeline.php line 33</li> <li>at <abbr title="Illuminate\Routing\Pipeline">Pipeline</abbr>->Illuminate\Routing\{closure}(object(<abbr title="Illuminate\Http\Request">Request</abbr>)) in StartSession.php line 64</li> <li>at <abbr title="Illuminate\Session\Middleware\StartSession">StartSession</abbr>->handle(object(<abbr title="Illuminate\Http\Request">Request</abbr>), object(<abbr title="Closure">Closure</abbr>)) in Pipeline.php line 137</li> <li>at <abbr title="Illuminate\Pipeline\Pipeline">Pipeline</abbr>->Illuminate\Pipeline\{closure}(object(<abbr title="Illuminate\Http\Request">Request</abbr>)) in Pipeline.php line 33</li> <li>at <abbr title="Illuminate\Routing\Pipeline">Pipeline</abbr>->Illuminate\Routing\{closure}(object(<abbr title="Illuminate\Http\Request">Request</abbr>)) in AddQueuedCookiesToResponse.php line 37</li> <li>at <abbr title="Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse">AddQueuedCookiesToResponse</abbr>->handle(object(<abbr title="Illuminate\Http\Request">Request</abbr>), object(<abbr title="Closure">Closure</abbr>)) in Pipeline.php line 137</li> <li>at <abbr title="Illuminate\Pipeline\Pipeline">Pipeline</abbr>->Illuminate\Pipeline\{closure}(object(<abbr title="Illuminate\Http\Request">Request</abbr>)) in Pipeline.php line 33</li> <li>at <abbr title="Illuminate\Routing\Pipeline">Pipeline</abbr>->Illuminate\Routing\{closure}(object(<abbr title="Illuminate\Http\Request">Request</abbr>)) in EncryptCookies.php line 59</li> <li>at <abbr title="Illuminate\Cookie\Middleware\EncryptCookies">EncryptCookies</abbr>->handle(object(<abbr title="Illuminate\Http\Request">Request</abbr>), object(<abbr title="Closure">Closure</abbr>)) in Pipeline.php line 137</li> <li>at <abbr title="Illuminate\Pipeline\Pipeline">Pipeline</abbr>->Illuminate\Pipeline\{closure}(object(<abbr title="Illuminate\Http\Request">Request</abbr>)) in Pipeline.php line 33</li> <li>at <abbr title="Illuminate\Routing\Pipeline">Pipeline</abbr>->Illuminate\Routing\{closure}(object(<abbr title="Illuminate\Http\Request">Request</abbr>)) in Pipeline.php line 104</li> <li>at <abbr title="Illuminate\Pipeline\Pipeline">Pipeline</abbr>->then(object(<abbr title="Closure">Closure</abbr>)) in Router.php line 644</li> <li>at <abbr title="Illuminate\Routing\Router">Router</abbr>->runRouteWithinStack(object(<abbr title="Illuminate\Routing\Route">Route</abbr>), object(<abbr title="Illuminate\Http\Request">Request</abbr>)) in Router.php line 618</li> <li>at <abbr title="Illuminate\Routing\Router">Router</abbr>->dispatchToRoute(object(<abbr title="Illuminate\Http\Request">Request</abbr>)) in Router.php line 596</li> <li>at <abbr title="Illuminate\Routing\Router">Router</abbr>->dispatch(object(<abbr title="Illuminate\Http\Request">Request</abbr>)) in Kernel.php line 268</li> <li>at <abbr title="Illuminate\Foundation\Http\Kernel">Kernel</abbr>->Illuminate\Foundation\Http\{closure}(object(<abbr title="Illuminate\Http\Request">Request</abbr>)) in Pipeline.php line 53</li> <li>at <abbr title="Illuminate\Routing\Pipeline">Pipeline</abbr>->Illuminate\Routing\{closure}(object(<abbr title="Illuminate\Http\Request">Request</abbr>)) in CheckForMaintenanceMode.php line 46</li> <li>at <abbr title="Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode">CheckForMaintenanceMode</abbr>->handle(object(<abbr title="Illuminate\Http\Request">Request</abbr>), object(<abbr title="Closure">Closure</abbr>)) in Pipeline.php line 137</li> <li>at <abbr title="Illuminate\Pipeline\Pipeline">Pipeline</abbr>->Illuminate\Pipeline\{closure}(object(<abbr title="Illuminate\Http\Request">Request</abbr>)) in Pipeline.php line 33</li> <li>at <abbr title="Illuminate\Routing\Pipeline">Pipeline</abbr>->Illuminate\Routing\{closure}(object(<abbr title="Illuminate\Http\Request">Request</abbr>)) in Pipeline.php line 104</li> <li>at <abbr title="Illuminate\Pipeline\Pipeline">Pipeline</abbr>->then(object(<abbr title="Closure">Closure</abbr>)) in Kernel.php line 150</li> <li>at <abbr title="Illuminate\Foundation\Http\Kernel">Kernel</abbr>->sendRequestThroughRouter(object(<abbr title="Illuminate\Http\Request">Request</abbr>)) in Kernel.php line 117</li> <li>at <abbr title="Illuminate\Foundation\Http\Kernel">Kernel</abbr>->handle(object(<abbr title="Illuminate\Http\Request">Request</abbr>)) in index.php line 53</li> <li>at <abbr title=""></abbr>require_once('G:\Laravel-Xampp7\htdocs\ecommerce\public\index.php') in server.php line 21</li> </ol> </div> </div> </body> </html>

your error says you are using rules undeclared static property of your model App\Image
if its static property you need to declare it in your model App\Image using
public static $rules = ['image' => 'required'];

Related

How can I split a large CSV file into multiple files of rougly equal size using bash tools alone?

Note that the CSV file may or may not have multiple line breaks in each cell, and each split file must also be a valid CSV file.
I have tried using split, however, if I split by number of lines, it doesn't take into account that the CSV can have line breaks inside fields, and if I split by filesize, it sometimes cuts the last line of the file in half, meaning that it is no longer a valid CSV file.
You can find a test file here:
https://pastebin.com/raw/pw9PF9U1
It looks like this:
post_title,tax:wcpv_product_vendors,post_content
Product title 1,Sample,"<div class=""productdetails"">
<h2 style=""margin: 0px 0px 15px; line-height: 1.2; text-align: center;"">Title</h2>
<p style=""color: #333333; margin: 0px; font-size: 13px; line-height: 23.1111px; padding: 0px; font-family: sans-serif, Arial, Verdana, 'Trebuchet MS';""><strong>Features:</strong></p>
<ul style=""padding: 0px 40px; margin: 0px; color: #333333; font-family: sans-serif, Arial, Verdana, 'Trebuchet MS'; font-size: 13px; line-height: 20.8px;"">
<li style=""list-style: none;"">Testing testing</li>
<li style=""list-style: none;"">One two three</li>
</ul>
</div>"
Product title 2,Sample,"<div class=""productdetails"">
<h2 style=""margin: 0px 0px 15px; line-height: 1.2; text-align: center;"">Title</h2>
<p style=""color: #333333; margin: 0px; font-size: 13px; line-height: 23.1111px; padding: 0px; font-family: sans-serif, Arial, Verdana, 'Trebuchet MS';""><strong>Features:</strong></p>
<ul style=""padding: 0px 40px; margin: 0px; color: #333333; font-family: sans-serif, Arial, Verdana, 'Trebuchet MS'; font-size: 13px; line-height: 20.8px;"">
<li style=""list-style: none;"">Testing testing</li>
<li style=""list-style: none;"">One two three</li>
</ul>
</div>"
Product title 3,Sample,"<div class=""productdetails"">
<h2 style=""margin: 0px 0px 15px; line-height: 1.2; text-align: center;"">Title</h2>
<p style=""color: #333333; margin: 0px; font-size: 13px; line-height: 23.1111px; padding: 0px; font-family: sans-serif, Arial, Verdana, 'Trebuchet MS';""><strong>Features:</strong></p>
<ul style=""padding: 0px 40px; margin: 0px; color: #333333; font-family: sans-serif, Arial, Verdana, 'Trebuchet MS'; font-size: 13px; line-height: 20.8px;"">
<li style=""list-style: none;"">Testing testing</li>
<li style=""list-style: none;"">One two three</li>
</ul>
</div>"
Product title 4,Sample,"<div class=""productdetails"">
<h2 style=""margin: 0px 0px 15px; line-height: 1.2; text-align: center;"">Title</h2>
<p style=""color: #333333; margin: 0px; font-size: 13px; line-height: 23.1111px; padding: 0px; font-family: sans-serif, Arial, Verdana, 'Trebuchet MS';""><strong>Features:</strong></p>
<ul style=""padding: 0px 40px; margin: 0px; color: #333333; font-family: sans-serif, Arial, Verdana, 'Trebuchet MS'; font-size: 13px; line-height: 20.8px;"">
<li style=""list-style: none;"">Testing testing</li>
<li style=""list-style: none;"">One two three</li>
</ul>
</div>"
Product title 5,Sample,"<div class=""productdetails"">
<h2 style=""margin: 0px 0px 15px; line-height: 1.2; text-align: center;"">Title</h2>
<p style=""color: #333333; margin: 0px; font-size: 13px; line-height: 23.1111px; padding: 0px; font-family: sans-serif, Arial, Verdana, 'Trebuchet MS';""><strong>Features:</strong></p>
<ul style=""padding: 0px 40px; margin: 0px; color: #333333; font-family: sans-serif, Arial, Verdana, 'Trebuchet MS'; font-size: 13px; line-height: 20.8px;"">
<li style=""list-style: none;"">Testing testing</li>
<li style=""list-style: none;"">One two three</li>
</ul>
</div>"
Product title 6,Sample,"<div class=""productdetails"">
<h2 style=""margin: 0px 0px 15px; line-height: 1.2; text-align: center;"">Title</h2>
<p style=""color: #333333; margin: 0px; font-size: 13px; line-height: 23.1111px; padding: 0px; font-family: sans-serif, Arial, Verdana, 'Trebuchet MS';""><strong>Features:</strong></p>
<ul style=""padding: 0px 40px; margin: 0px; color: #333333; font-family: sans-serif, Arial, Verdana, 'Trebuchet MS'; font-size: 13px; line-height: 20.8px;"">
<li style=""list-style: none;"">Testing testing</li>
<li style=""list-style: none;"">One two three</li>
</ul>
</div>"
Product title 7,Sample,"<div class=""productdetails"">
<h2 style=""margin: 0px 0px 15px; line-height: 1.2; text-align: center;"">Title</h2>
<p style=""color: #333333; margin: 0px; font-size: 13px; line-height: 23.1111px; padding: 0px; font-family: sans-serif, Arial, Verdana, 'Trebuchet MS';""><strong>Features:</strong></p>
<ul style=""padding: 0px 40px; margin: 0px; color: #333333; font-family: sans-serif, Arial, Verdana, 'Trebuchet MS'; font-size: 13px; line-height: 20.8px;"">
<li style=""list-style: none;"">Testing testing</li>
<li style=""list-style: none;"">One two three</li>
</ul>
</div>"
Product title 8,Sample,"<div class=""productdetails"">
<h2 style=""margin: 0px 0px 15px; line-height: 1.2; text-align: center;"">Title</h2>
<p style=""color: #333333; margin: 0px; font-size: 13px; line-height: 23.1111px; padding: 0px; font-family: sans-serif, Arial, Verdana, 'Trebuchet MS';""><strong>Features:</strong></p>
<ul style=""padding: 0px 40px; margin: 0px; color: #333333; font-family: sans-serif, Arial, Verdana, 'Trebuchet MS'; font-size: 13px; line-height: 20.8px;"">
<li style=""list-style: none;"">Testing testing</li>
<li style=""list-style: none;"">One two three</li>
</ul>
</div>"
Product title 9,Sample,"<div class=""productdetails"">
<h2 style=""margin: 0px 0px 15px; line-height: 1.2; text-align: center;"">Title</h2>
<p style=""color: #333333; margin: 0px; font-size: 13px; line-height: 23.1111px; padding: 0px; font-family: sans-serif, Arial, Verdana, 'Trebuchet MS';""><strong>Features:</strong></p>
<ul style=""padding: 0px 40px; margin: 0px; color: #333333; font-family: sans-serif, Arial, Verdana, 'Trebuchet MS'; font-size: 13px; line-height: 20.8px;"">
<li style=""list-style: none;"">Testing testing</li>
<li style=""list-style: none;"">One two three</li>
</ul>
</div>"
Also note each row of the csv has a ^M symbol at the end of it when I open it in vim. That may be useful to split correctly.
Here's one in awk. You provide it with filename and the maximum number of "lines" (for example -v m=3) you want in one file and it splits the file (based on your data) on lines that do not start with < so basically the header and the product title lines:
$ awk -v m=3 'NR==1{j=0}{if($0!~/^</){i++;if(i>m){i=1;j++}};print > "split-" j}' file
$ ls -1rt
split-3
split-2
split-1
split-0
$ cat split-3
Product title 9,Sample,"<div class=""productdetails"">
<h2 style=""margin: 0px 0px 15px; line-height: 1.2; text-align: center;"">Title</h2>
<p style=""color: #333333; margin: 0px; font-size: 13px; line-height: 23.1111px; padding: 0px; font-family: sans-serif, Arial, Verdana, 'Trebuchet MS';""><strong>Features:</strong></p>
<ul style=""padding: 0px 40px; margin: 0px; color: #333333; font-family: sans-serif, Arial, Verdana, 'Trebuchet MS'; font-size: 13px; line-height: 20.8px;"">
<li style=""list-style: none;"">Testing testing</li>
<li style=""list-style: none;"">One two three</li>
</ul>
</div>"
Explained:
awk -v m=3 ' # provide m
NR==1 { # on the first record
j=0 # set j to 0
}
{
if($0!~/^</) { # when a line not starting with a < is met
i++ # increase line counter
if(i>m) { # if line counter exceeds max
i=1 # reset it back to 1
j++ # split file name index
}
}
print > "split-" j # output
}' file
to split file.csv to 5 files
split -n 5 file.csv
If you need to support embedded newline characters,
then there is no easy way to do this right using Bash alone.
Otherwise split could have been a good choice.
You could implement a CSV parser (of your desired dialect) in Bash,
but it would be a lot of work for a fragile solution.
It's better to not use Bash for this,
but some other language with good library support for proper CSV parsing.
Such as Python,
which comes with a csv package included.
Here is a method that still makes split usable.
The incentive here is to use a null byte character \0 instead of a new line character \n as a record separator for splitting.
First, we can use sed to add a \0 to the beginning of each line that does not begin with <
sed 's/^[^<]/\x0&/' file.csv > file_tmp.csv
Next, we can use split as usual
split -n l/5 -t '\0' --filter='sed 's/\x0//g' > $FILE.csv' file_tmp.csv split_
-n l/5 splits file into roughly 5 equal parts without splitting records
-t '\0' uses the null byte character as a record separator
--filter='sed 's/\x0//g' > $FILE.csv' removes all null byte characters from splitted files

Laravel 5 throw just exception error on its own

I am running the following query :
$data2 = DB::table('affiliate')->where('affID','=', $collectData['AffiliateID'])->where('AffStatus','==',1)->get();
if (count($data2)) {
throw new Exception('Affiliate Paused');
}
When there is an error, it throws an exception , but a whole lot of other error information as well, please see below. How do i throw only the Exception error and nothing else.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="robots" content="noindex,nofollow" />
<style>
/* Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.com/yui/license.html */
html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:text-top;}sub{vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}input,textarea,select{*font-size:100%;}legend{color:#000;}
html { background: #eee; padding: 10px }
img { border: 0; }
#sf-resetcontent { width:970px; margin:0 auto; }
.sf-reset { font: 11px Verdana, Arial, sans-serif; color: #333 }
.sf-reset .clear { clear:both; height:0; font-size:0; line-height:0; }
.sf-reset .clear_fix:after { display:block; height:0; clear:both; visibility:hidden; }
.sf-reset .clear_fix { display:inline-block; }
.sf-reset * html .clear_fix { height:1%; }
.sf-reset .clear_fix { display:block; }
.sf-reset, .sf-reset .block { margin: auto }
.sf-reset abbr { border-bottom: 1px dotted #000; cursor: help; }
.sf-reset p { font-size:14px; line-height:20px; color:#868686; padding-bottom:20px }
.sf-reset strong { font-weight:bold; }
.sf-reset a { color:#6c6159; cursor: default; }
.sf-reset a img { border:none; }
.sf-reset a:hover { text-decoration:underline; }
.sf-reset em { font-style:italic; }
.sf-reset h1, .sf-reset h2 { font: 20px Georgia, "Times New Roman", Times, serif }
.sf-reset .exception_counter { background-color: #fff; color: #333; padding: 6px; float: left; margin-right: 10px; float: left; display: block; }
.sf-reset .exception_title { margin-left: 3em; margin-bottom: 0.7em; display: block; }
.sf-reset .exception_message { margin-left: 3em; display: block; }
.sf-reset .traces li { font-size:12px; padding: 2px 4px; list-style-type:decimal; margin-left:20px; }
.sf-reset .block { background-color:#FFFFFF; padding:10px 28px; margin-bottom:20px;
border-bottom-right-radius: 16px;
border-bottom-left-radius: 16px;
border-bottom:1px solid #ccc;
border-right:1px solid #ccc;
border-left:1px solid #ccc;
word-wrap: break-word;
}
.sf-reset .block_exception { background-color:#ddd; color: #333; padding:20px;
border-top-left-radius: 16px;
border-top-right-radius: 16px;
border-top:1px solid #ccc;
border-right:1px solid #ccc;
border-left:1px solid #ccc;
overflow: hidden;
word-wrap: break-word;
}
.sf-reset a { background:none; color:#868686; text-decoration:none; }
.sf-reset a:hover { background:none; color:#313131; text-decoration:underline; }
.sf-reset ol { padding: 10px 0; }
.sf-reset h1 { background-color:#FFFFFF; padding: 15px 28px; margin-bottom: 20px;
border-radius: 10px;
border: 1px solid #ccc;
}
</style>
</head>
<body ondblclick="var t = event.target; if (t.title && !t.href) { var f = t.innerHTML; t.innerHTML = t.title; t.title = f; }">
<div id="sf-resetcontent" class="sf-reset">
<h1>Whoops, looks like something went wrong.</h1>
<h2 class="block_exception clear_fix">
<span class="exception_counter">1/1</span>
<span class="exception_title"><abbr title="ErrorException">ErrorException</abbr> in <a title="/home/comloantreedata/public_html/api/routes/web.php line 199">web.php line 199</a>:</span>
<span class="exception_message">Undefined index: AffiliateIDs</span>
</h2>
<div class="block">
<ol class="traces list_exception">
<li> in <a title="/home/comloantreedata/public_html/api/routes/web.php line 199">web.php line 199</a></li>
<li>at <abbr title="Illuminate\Foundation\Bootstrap\HandleExceptions">HandleExceptions</abbr>->handleError(8, 'Undefined index: AffiliateIDs', '/home/comloantreedata/public_html/api/routes/web.php', 199, <em>array</em>('collectData' => <em>array</em>('SubID2' => '99999999', 'LeadSource' => 'testdomain.com', 'Address1' => 'Flat 5, Jacobs Court', 'Address2' => 'Kyrle Street', 'AddressFrom' => '2014-04-01', 'AddressStatus' => 'private tenant', 'AffiliateID' => 'StressTest', 'APIKey' => '46AB77889181713BFB7200EA7479636009284C8F44536192947870E4AA8F0053', 'AffiliateReference' => 'MW0010', 'BankAccount' => '23411931', 'BankSortCode' => '203964', 'Consent' => '1', 'County' => 'Herefordshire', 'DebitCard' => 'visa debit', 'DOB' => '1983-07-31', 'Email' => 'slawekk83#googlemail.com', 'Employer' => 'Cargill', 'Position' => 'Other', 'ExpenseCredit' => '20', 'ExpenseRentMortgage' => '20', 'ExpenseUtilitiesBills' => '20', 'ExpenseTransport' => '70', 'ExpenseFood' => '60', 'ExpenseRegularOutgoings' => '67', 'FirstName' => 'Slawomir', 'IncomeFollowing' => '2017-06-30', 'IncomeFrequency' => 'last working day of month', 'IncomeFrom' => '2014-04-01', 'IncomeMethod' => 'direct into account', 'IncomeMonthly' => '1400', 'IncomeNext' => '2017-05-31', 'IncomeSource' => 'full time employment', 'Industry' => 'not applicable', 'IPAddress' => '94.197.120.118', 'HomePhone' => '01432352400', 'LastName' => 'Kozlowski', 'Live' => '1', 'LoanAmount' => '150', 'MaxTime' => '180', 'MinPrice' => '5', 'Browser' => 'Safari', 'MobilePhone' => '07397764024', 'OPTIN' => '1', 'Postcode' => 'HR1 2EW', 'Title' => 'Mr', 'Town' => 'HEREFORD', 'WorkPhone' => '01432352400', 'SubID1' => '11532', 'SubID3' => <em>null</em>, 'Dependants' => '1', 'MaritalStatus' => 'single', 'LoanReason' => 'pay bills', 'Company' => 'MDXSOLUTIONS', 'Energy' => 'British Gas', 'LoanDuration' => '3', 'Guarantor' => '0', 'Debt5K' => '1'), 'dataCheck1' => <em>object</em>(<abbr title="Illuminate\Support\Collection">Collection</abbr>))) in <a title="/home/comloantreedata/public_html/api/routes/web.php line 199">web.php line 199</a></li>
<li>at <abbr title="Illuminate\Routing\Router">Router</abbr>->{closure}() in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Routing/Route.php line 190">Route.php line 190</a></li>
<li>at <abbr title="Illuminate\Routing\Route">Route</abbr>->runCallable() in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Routing/Route.php line 163">Route.php line 163</a></li>
<li>at <abbr title="Illuminate\Routing\Route">Route</abbr>->run() in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php line 559">Router.php line 559</a></li>
<li>at <abbr title="Illuminate\Routing\Router">Router</abbr>->Illuminate\Routing\{closure}(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php line 30">Pipeline.php line 30</a></li>
<li>at <abbr title="Illuminate\Routing\Pipeline">Pipeline</abbr>->Illuminate\Routing\{closure}(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php line 41">SubstituteBindings.php line 41</a></li>
<li>at <abbr title="Illuminate\Routing\Middleware\SubstituteBindings">SubstituteBindings</abbr>->handle(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>), <em>object</em>(<abbr title="Closure">Closure</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php line 148">Pipeline.php line 148</a></li>
<li>at <abbr title="Illuminate\Pipeline\Pipeline">Pipeline</abbr>->Illuminate\Pipeline\{closure}(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php line 53">Pipeline.php line 53</a></li>
<li>at <abbr title="Illuminate\Routing\Pipeline">Pipeline</abbr>->Illuminate\Routing\{closure}(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php line 65">VerifyCsrfToken.php line 65</a></li>
<li>at <abbr title="Illuminate\Foundation\Http\Middleware\VerifyCsrfToken">VerifyCsrfToken</abbr>->handle(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>), <em>object</em>(<abbr title="Closure">Closure</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php line 148">Pipeline.php line 148</a></li>
<li>at <abbr title="Illuminate\Pipeline\Pipeline">Pipeline</abbr>->Illuminate\Pipeline\{closure}(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php line 53">Pipeline.php line 53</a></li>
<li>at <abbr title="Illuminate\Routing\Pipeline">Pipeline</abbr>->Illuminate\Routing\{closure}(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php line 49">ShareErrorsFromSession.php line 49</a></li>
<li>at <abbr title="Illuminate\View\Middleware\ShareErrorsFromSession">ShareErrorsFromSession</abbr>->handle(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>), <em>object</em>(<abbr title="Closure">Closure</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php line 148">Pipeline.php line 148</a></li>
<li>at <abbr title="Illuminate\Pipeline\Pipeline">Pipeline</abbr>->Illuminate\Pipeline\{closure}(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php line 53">Pipeline.php line 53</a></li>
<li>at <abbr title="Illuminate\Routing\Pipeline">Pipeline</abbr>->Illuminate\Routing\{closure}(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php line 64">StartSession.php line 64</a></li>
<li>at <abbr title="Illuminate\Session\Middleware\StartSession">StartSession</abbr>->handle(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>), <em>object</em>(<abbr title="Closure">Closure</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php line 148">Pipeline.php line 148</a></li>
<li>at <abbr title="Illuminate\Pipeline\Pipeline">Pipeline</abbr>->Illuminate\Pipeline\{closure}(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php line 53">Pipeline.php line 53</a></li>
<li>at <abbr title="Illuminate\Routing\Pipeline">Pipeline</abbr>->Illuminate\Routing\{closure}(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php line 37">AddQueuedCookiesToResponse.php line 37</a></li>
<li>at <abbr title="Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse">AddQueuedCookiesToResponse</abbr>->handle(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>), <em>object</em>(<abbr title="Closure">Closure</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php line 148">Pipeline.php line 148</a></li>
<li>at <abbr title="Illuminate\Pipeline\Pipeline">Pipeline</abbr>->Illuminate\Pipeline\{closure}(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php line 53">Pipeline.php line 53</a></li>
<li>at <abbr title="Illuminate\Routing\Pipeline">Pipeline</abbr>->Illuminate\Routing\{closure}(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php line 59">EncryptCookies.php line 59</a></li>
<li>at <abbr title="Illuminate\Cookie\Middleware\EncryptCookies">EncryptCookies</abbr>->handle(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>), <em>object</em>(<abbr title="Closure">Closure</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php line 148">Pipeline.php line 148</a></li>
<li>at <abbr title="Illuminate\Pipeline\Pipeline">Pipeline</abbr>->Illuminate\Pipeline\{closure}(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php line 53">Pipeline.php line 53</a></li>
<li>at <abbr title="Illuminate\Routing\Pipeline">Pipeline</abbr>->Illuminate\Routing\{closure}(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php line 102">Pipeline.php line 102</a></li>
<li>at <abbr title="Illuminate\Pipeline\Pipeline">Pipeline</abbr>->then(<em>object</em>(<abbr title="Closure">Closure</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php line 561">Router.php line 561</a></li>
<li>at <abbr title="Illuminate\Routing\Router">Router</abbr>->runRouteWithinStack(<em>object</em>(<abbr title="Illuminate\Routing\Route">Route</abbr>), <em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php line 520">Router.php line 520</a></li>
<li>at <abbr title="Illuminate\Routing\Router">Router</abbr>->dispatchToRoute(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php line 498">Router.php line 498</a></li>
<li>at <abbr title="Illuminate\Routing\Router">Router</abbr>->dispatch(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php line 174">Kernel.php line 174</a></li>
<li>at <abbr title="Illuminate\Foundation\Http\Kernel">Kernel</abbr>->Illuminate\Foundation\Http\{closure}(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php line 30">Pipeline.php line 30</a></li>
<li>at <abbr title="Illuminate\Routing\Pipeline">Pipeline</abbr>->Illuminate\Routing\{closure}(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php line 30">TransformsRequest.php line 30</a></li>
<li>at <abbr title="Illuminate\Foundation\Http\Middleware\TransformsRequest">TransformsRequest</abbr>->handle(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>), <em>object</em>(<abbr title="Closure">Closure</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php line 148">Pipeline.php line 148</a></li>
<li>at <abbr title="Illuminate\Pipeline\Pipeline">Pipeline</abbr>->Illuminate\Pipeline\{closure}(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php line 53">Pipeline.php line 53</a></li>
<li>at <abbr title="Illuminate\Routing\Pipeline">Pipeline</abbr>->Illuminate\Routing\{closure}(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php line 30">TransformsRequest.php line 30</a></li>
<li>at <abbr title="Illuminate\Foundation\Http\Middleware\TransformsRequest">TransformsRequest</abbr>->handle(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>), <em>object</em>(<abbr title="Closure">Closure</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php line 148">Pipeline.php line 148</a></li>
<li>at <abbr title="Illuminate\Pipeline\Pipeline">Pipeline</abbr>->Illuminate\Pipeline\{closure}(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php line 53">Pipeline.php line 53</a></li>
<li>at <abbr title="Illuminate\Routing\Pipeline">Pipeline</abbr>->Illuminate\Routing\{closure}(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php line 27">ValidatePostSize.php line 27</a></li>
<li>at <abbr title="Illuminate\Foundation\Http\Middleware\ValidatePostSize">ValidatePostSize</abbr>->handle(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>), <em>object</em>(<abbr title="Closure">Closure</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php line 148">Pipeline.php line 148</a></li>
<li>at <abbr title="Illuminate\Pipeline\Pipeline">Pipeline</abbr>->Illuminate\Pipeline\{closure}(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php line 53">Pipeline.php line 53</a></li>
<li>at <abbr title="Illuminate\Routing\Pipeline">Pipeline</abbr>->Illuminate\Routing\{closure}(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php line 46">CheckForMaintenanceMode.php line 46</a></li>
<li>at <abbr title="Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode">CheckForMaintenanceMode</abbr>->handle(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>), <em>object</em>(<abbr title="Closure">Closure</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php line 148">Pipeline.php line 148</a></li>
<li>at <abbr title="Illuminate\Pipeline\Pipeline">Pipeline</abbr>->Illuminate\Pipeline\{closure}(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php line 53">Pipeline.php line 53</a></li>
<li>at <abbr title="Illuminate\Routing\Pipeline">Pipeline</abbr>->Illuminate\Routing\{closure}(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php line 102">Pipeline.php line 102</a></li>
<li>at <abbr title="Illuminate\Pipeline\Pipeline">Pipeline</abbr>->then(<em>object</em>(<abbr title="Closure">Closure</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php line 149">Kernel.php line 149</a></li>
<li>at <abbr title="Illuminate\Foundation\Http\Kernel">Kernel</abbr>->sendRequestThroughRouter(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>)) in <a title="/home/comloantreedata/public_html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php line 116">Kernel.php line 116</a></li>
<li>at <abbr title="Illuminate\Foundation\Http\Kernel">Kernel</abbr>->handle(<em>object</em>(<abbr title="Illuminate\Http\Request">Request</abbr>)) in <a title="/home/comloantreedata/public_html/api/public/index.php line 54">index.php line 54</a></li>
</ol>
</div>
</div>
</body>
</html>
You could try this, this will only echo out your error response. It does not deal with exceptions at all, it will just stop the script from running any further.
$data2 = DB::table('affiliate')->where('affID','=', $collectData['AffiliateID'])->where('AffStatus','==',1)->get();
if (!count($data2)) {
echo 'Affiliate ID is incorrect or not active';
exit();
}

Laravel 5 Ajax Internal Server Error 500

I am using this to get my Ajax post call to work in a Laravel 5 app:
<meta name="csrf-token" content="<?= csrf_token() ?>">
$.ajaxSetup({
headers: {
'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content')
}
});
request = $.ajax({
url: "/user",
type: "post", success:function(data){
},
data: {'email': email} ,beforeSend: function(data){console.log(data);}
});
I can see the token rendering correctly in the page source, but I still get the Internal Server Error 500 and the Ajax call fails. Any idea what is happening?
EDIT:
Ajax Output:
POST http://vidvalize.dev/user 500 (Internal Server Error)n.ajaxTransport.k.cors.a.crossDomain.send # jquery-2.1.4.min.js:4n.extend.ajax # jquery-2.1.4.min.js:4React.createClass.saveAndContinue # script.js:37u # react.min.js:12_.executeDispatch # react.min.js:16a # react.min.js:12s # react.min.js:12c # react.min.js:12r # react.min.js:16d.processEventQueue # react.min.js:12r # react.min.js:15i.handleTopLevel # react.min.js:15i # react.min.js:15o.perform # react.min.js:16d.batchedUpdates # react.min.js:13i # react.min.js:15v.dispatchEvent # react.min.js:15
Object {readyState: 0}abort: (a){var b=a||u;return c&&c.abort(b),x(0,b),this}always: (){return e.done(arguments).fail(arguments),this}complete: (){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this}done: (){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this}error: (){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this}fail: (){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this}getAllResponseHeaders: (){return 2===t?e:null}getResponseHeader: (a){var b;if(2===t){if(!f){f={};while(b=gb.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b}overrideMimeType: (a){return t||(k.mimeType=a),this}pipe: (){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()}progress: (){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this}promise: (a){return null!=a?n.extend(a,d):d}readyState: 4responseText: "<!DOCTYPE html>↵<html>↵ <head>↵ <meta charset="UTF-8" />↵ <meta name="robots" content="noindex,nofollow" />↵ <style>↵ /* Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.com/yui/license.html */↵ html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:text-top;}sub{vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}input,textarea,select{*font-size:100%;}legend{color:#000;}↵↵ html { background: #eee; padding: 10px }↵ img { border: 0; }↵ #sf-resetcontent { width:970px; margin:0 auto; }↵ .sf-reset { font: 11px Verdana, Arial, sans-serif; color: #333 }↵ .sf-reset .clear { clear:both; height:0; font-size:0; line-height:0; }↵ .sf-reset .clear_fix:after { display:block; height:0; clear:both; visibility:hidden; }↵ .sf-reset .clear_fix { display:inline-block; }↵ .sf-reset * html .clear_fix { height:1%; }↵ .sf-reset .clear_fix { display:block; }↵ .sf-reset, .sf-reset .block { margin: auto }↵ .sf-reset abbr { border-bottom: 1px dotted #000; cursor: help; }↵ .sf-reset p { font-size:14px; line-height:20px; color:#868686; padding-bottom:20px }↵ .sf-reset strong { font-weight:bold; }↵ .sf-reset a { color:#6c6159; cursor: default; }↵ .sf-reset a img { border:none; }↵ .sf-reset a:hover { text-decoration:underline; }↵ .sf-reset em { font-style:italic; }↵ .sf-reset h1, .sf-reset h2 { font: 20px Georgia, "Times New Roman", Times, serif }↵ .sf-reset .exception_counter { background-color: #fff; color: #333; padding: 6px; float: left; margin-right: 10px; float: left; display: block; }↵ .sf-reset .exception_title { margin-left: 3em; margin-bottom: 0.7em; display: block; }↵ .sf-reset .exception_message { margin-left: 3em; display: block; }↵ .sf-reset .traces li { font-size:12px; padding: 2px 4px; list-style-type:decimal; margin-left:20px; }↵ .sf-reset .block { background-color:#FFFFFF; padding:10px 28px; margin-bottom:20px;↵ -webkit-border-bottom-right-radius: 16px;↵ -webkit-border-bottom-left-radius: 16px;↵ -moz-border-radius-bottomright: 16px;↵ -moz-border-radius-bottomleft: 16px;↵ border-bottom-right-radius: 16px;↵ border-bottom-left-radius: 16px;↵ border-bottom:1px solid #ccc;↵ border-right:1px solid #ccc;↵ border-left:1px solid #ccc;↵ }↵ .sf-reset .block_exception { background-color:#ddd; color: #333; padding:20px;↵ -webkit-border-top-left-radius: 16px;↵ -webkit-border-top-right-radius: 16px;↵ -moz-border-radius-topleft: 16px;↵ -moz-border-radius-topright: 16px;↵ border-top-left-radius: 16px;↵ border-top-right-radius: 16px;↵ border-top:1px solid #ccc;↵ border-right:1px solid #ccc;↵ border-left:1px solid #ccc;↵ overflow: hidden;↵ word-wrap: break-word;↵ }↵ .sf-reset a { background:none; color:#868686; text-decoration:none; }↵ .sf-reset a:hover { background:none; color:#313131; text-decoration:underline; }↵ .sf-reset ol { padding: 10px 0; }↵ .sf-reset h1 { background-color:#FFFFFF; padding: 15px 28px; margin-bottom: 20px;↵ -webkit-border-radius: 10px;↵ -moz-border-radius: 10px;↵ border-radius: 10px;↵ border: 1px solid #ccc;↵ }↵ </style>↵ </head>↵ <body>↵ <div id="sf-resetcontent" class="sf-reset">↵ <h1>Whoops, looks like something went wrong.</h1>↵ <h2 class="block_exception clear_fix">↵ <span class="exception_counter">1/1</span>↵ <span class="exception_title"><abbr title="Symfony\Component\Debug\Exception\FatalErrorException">FatalErrorException</abbr> in <a title="/home/vagrant/code/vidvalize/app/Http/Controllers/UserController.php line 5" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">UserController.php line 5</a>:</span>↵ <sp…>Illuminate\Pipeline\{closure}() in <a title="/home/vagrant/code/vidvalize/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php line 37" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">AddQueuedCookiesToResponse.php line 37</a></li>↵ <li>at <abbr title="Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse">AddQueuedCookiesToResponse</abbr>->handle() in <a title="/home/vagrant/code/vidvalize/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php line 124" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">Pipeline.php line 124</a></li>↵ <li>at <abbr title=""></abbr>call_user_func_array:{/home/vagrant/code/vidvalize/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:124}() in <a title="/home/vagrant/code/vidvalize/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php line 124" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">Pipeline.php line 124</a></li>↵ <li>at <abbr title="Illuminate\Pipeline\Pipeline">Pipeline</abbr>->Illuminate\Pipeline\{closure}() in <a title="/home/vagrant/code/vidvalize/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php line 59" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">EncryptCookies.php line 59</a></li>↵ <li>at <abbr title="Illuminate\Cookie\Middleware\EncryptCookies">EncryptCookies</abbr>->handle() in <a title="/home/vagrant/code/vidvalize/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php line 124" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">Pipeline.php line 124</a></li>↵ <li>at <abbr title=""></abbr>call_user_func_array:{/home/vagrant/code/vidvalize/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:124}() in <a title="/home/vagrant/code/vidvalize/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php line 124" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">Pipeline.php line 124</a></li>↵ <li>at <abbr title="Illuminate\Pipeline\Pipeline">Pipeline</abbr>->Illuminate\Pipeline\{closure}() in <a title="/home/vagrant/code/vidvalize/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php line 42" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">CheckForMaintenanceMode.php line 42</a></li>↵ <li>at <abbr title="Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode">CheckForMaintenanceMode</abbr>->handle() in <a title="/home/vagrant/code/vidvalize/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php line 124" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">Pipeline.php line 124</a></li>↵ <li>at <abbr title=""></abbr>call_user_func_array:{/home/vagrant/code/vidvalize/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:124}() in <a title="/home/vagrant/code/vidvalize/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php line 124" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">Pipeline.php line 124</a></li>↵ <li>at <abbr title="Illuminate\Pipeline\Pipeline">Pipeline</abbr>->Illuminate\Pipeline\{closure}() in <a title="/home/vagrant/code/vidvalize/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php line 103" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">Pipeline.php line 103</a></li>↵ <li>at <abbr title=""></abbr>call_user_func:{/home/vagrant/code/vidvalize/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:103}() in <a title="/home/vagrant/code/vidvalize/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php line 103" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">Pipeline.php line 103</a></li>↵ <li>at <abbr title="Illuminate\Pipeline\Pipeline">Pipeline</abbr>->then() in <a title="/home/vagrant/code/vidvalize/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php line 118" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">Kernel.php line 118</a></li>↵ <li>at <abbr title="Illuminate\Foundation\Http\Kernel">Kernel</abbr>->sendRequestThroughRouter() in <a title="/home/vagrant/code/vidvalize/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php line 86" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">Kernel.php line 86</a></li>↵ <li>at <abbr title="Illuminate\Foundation\Http\Kernel">Kernel</abbr>->handle() in <a title="/home/vagrant/code/vidvalize/public/index.php line 54" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">index.php line 54</a></li>↵ <li>at <abbr title=""></abbr>{main}() in <a title="/home/vagrant/code/vidvalize/public/index.php line 0" ondblclick="var f=this.innerHTML;this.innerHTML=this.title;this.title=f;">index.php line 0</a></li>↵ </ol>↵</div>↵↵ </div>↵ </body>↵</html>"setRequestHeader: (a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this}state: (){return c}status: 500statusCode: (a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this}statusText: "Internal Server Error"success: (){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this}then: (){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()}__proto__: Object
There can be many reasons for internal server error. It would be helpful to narrow down the problem, if you can post entire ajax response.
But if you think, it has to do with csrf_token try sending it as a request data like below,
request = $.ajax({
url: "/user",
type: "post",
data: 'email=' + email + '&_token={{ csrf_token() }}',
beforeSend: function(data){console.log(data);},
success:function(data){}
});
Are there POST parameters you need to be sending?

Issue previewing pdf document created with Laravel DOM pdf

I am using barryvdh's library DOMPdf to generate pdf documents from html. My goal is to make it possible for users to preview their invoices as pdf before they submit the form. I am using Ajax to pass the data from the form to the controller. The controller receives the data from the form, but it returns an encoded string which I cannot decode and display. I would like to display the invoice on the same page in a pop-up, but it could also be made into a new window.
Any suggestions would be appreciated:
Javascript code:
$(document).on("click", ".viewAsPdf", function(){
var formID = $(this).closest("form").attr("id");
var formHTML = document.getElementById(formID).innerHTML;
var nettoTotal = "";
var vatTotal = "";
var bruttoTotal ="";
var formData = "";
var url="";
switch(formID){
case "demandOfferForm":
nettoTotal = $(formHTML).find("#demandOfferTotalNetto").text();
vatTotal = $(formHTML).find("#demandOfferTotalVat").text();
bruttoTotal = $(formHTML).find("#demandOfferTotalBrutto").text();
formData ="nettoTotal="+nettoTotal+"&vatTotal="+vatTotal+"&bruttoTotal="+bruttoTotal;
console.log(formData);
url ="../buy/newOffer/pdfOffer";
var pdf = doAjaxCall(url, formData);
break;
}
});
Ajax call
function doAjaxCall(url, formData){
$.ajax({
type : 'GET',
url: url,
data : formData,
})
.done(function(data) {
console.log(data);
$('#demandOfferForm').fadeOut();
$('#buyNewOffer').html(data);
})
// If the data hasn't beed received correct.
.fail(function(data) {
console.log(data);
});
}
Controller code
public function previewPDF(){
$nettoTotal = Input::get("nettoTotal");
$vatTotal = Input::get("vatTotal");
$grossTotal = Input::get("bruttoTotal");
$pdf = App::make('dompdf');
$pdfContent ='';
$pdfContent .='<DOCTYPE HTML><html>';
$pdfContent .='<head></head><body>';
// $pdfContent .='<head><link rel="stylesheet" href="http://localhost/freesoft_front/public/css/pdf.css" type="text/css"></head><body>';
$pdfContent .='<div class="pdfContent" style="position:absolute;">';
$pdfContent .='<div class="companyInfo" style="position:absolute;">';
$pdfContent .='<h4 style="padding:0; margin:0; text-align: right; line-height: 10px;">Faktura</h4>';
$pdfContent .='<div class="header">';
$pdfContent .='<div class="headerLeft" style="display: inline-block; width:50%; text-align: left;">';
$pdfContent .='<div class="logoContainer" style="height: 50px; border: 1px solid blue;"><p>Company logo goes here</p></div>';
$pdfContent .='<p>Hr. Hansen</p>';
$pdfContent .='<p>Strømvej 2</p>';
$pdfContent .='<br/> <p>5700 Svandeborg</p>';
$pdfContent .='</div>';
$pdfContent .='<div class="headerRight" style="display: inline-block; width:50%; text-align: right;"><p>DEMO Firma</p>';
$pdfContent .='<p> 9560 Hadslund</p>';
$pdfContent .='<p> Tlf: 44 55 90 17</p>';
$pdfContent .='<p> <strong> FAKTURA NR. : 18540 </strong></p>';
$pdfContent .='<br/> <p class="smallInput" style="font-size: 15px; line-height: 5px;">Dato: 15-09-2014</p>';
$pdfContent .='<p class="smallInput" style="font-size: 15px; line-height: 5px;">Forfaldsdato: 23-09-2014</p>';
$pdfContent .='</div>';
$pdfContent .='</div>';
// ------------end of header
$pdfContent .= '<div class="paymentDetails">';
$pdfContent .='<div class="detailsLeft" style="display: inline-block; width:50%; text-align: left;">';
$pdfContent .='<p class="smallInput" style="font-size: 15px; line-height: 5px;"> Kundenr.: 358</p><br/>';
$pdfContent .='<p class="smallInput" style="font-size: 15px; line-height: 5px;"> Betailngsbet.: 8 dage</p>';
$pdfContent .='<p class="smallInput" style="font-size: 15px; line-height: 5px;"> Rentebet.: 1,3% rente pr. påb. måned</p>';
$pdfContent .='</div>';
$pdfContent .='<div class="detailsRight" style="bottom:0px; display: inline-block; width:50%; text-align: right;">';
$pdfContent .='<p class="smallInput" style="font-size: 15px; line-height: 5px;"> Bank</p>';
$pdfContent .='<p class="smallInput" style="font-size: 15px; line-height: 5px;">Kontonr.: 9999 0001234567</p>';
$pdfContent .='</div>';
$pdfContent .= '</div>';
// ------------end of paymentDetails
$pdfContent .='<div class="invoiceLines">';
$pdfContent .='<div class="linesHeading" style="border-top:1px solid black; border-bottom: 1px solid black;">';
$pdfContent .='<p style="line-height:5px;">Tekst <span style="margin:0px 0px 0px 350px;">Antal</span> <span style="margin:0px 0px 0px 75px;"> A pris</span> <span style="margin:0px 0px 0px 75px;">Nettobeløb</span></p>';
$pdfContent .='</div>';
// foreach ($lines as $index => $line) {
// $pdfContent .='<p class="line"><span style="display: inline-block; width:55%;">'.$line -> ItemName_Line .'</span> <span style="display: inline-block; width:15%;">'. $line -> Quantity_Line .'</span> <span style="display: inline-block; width:17%;">'.$line -> Price_Line.'</span> <span style="display:inline-block; width:10%; text-align:right;">'.$line -> Netto_Total_Line.'</span></p>';
// }
$pdfContent .='</div>';
// --------------end of invoice lines
$pdfContent .='<div style="border-top:1px solid black; border-bottom: 1px solid black; position:absolute; bottom:0;">';
$pdfContent .='<p style="line-height:8px;"> <span style="display:inline-block;width:41%;"> Nettobeløb </span> <span style="display:inline-block; width:43.5%;"> Momsbeløb </span> <span style="text-align:right; display:inline-block; width:14%;"> Totalbeløb</span></p>';
$pdfContent .='<p style="line-height:2px;"> <span style="display:inline-block;width:41.5%;"> '.$nettoTotal.' </span> <span style="display:inline-block; width:43%;"> '.$vatTotal.' </span> <strong> <span style="text-align:right; display:inline-block; width:13.5%;">'.$grossTotal.'</span></strong></p>';
$pdfContent .='</div>';
$pdfContent .='</div>';
$pdfContent .='</div>';
$pdfContent .='</html></body>';
$pdf->loadHTML($pdfContent);
return $pdf->stream();
}
Output snippet:
stream x����N�#��y����J�t�v�%E�R)�+�')ű�m�����'������9�����gc0�V��I�{F�c�T�d�e��d���?.һ��J?�#r��l��w��w2Z ��9\��C6� ��` G'#�Yҡ��>�U�e�k �/��������y�)aS�~����%' Rf&qV!��E��9Z�"�US=o��X�\��-���1-��*�͐U^Q�ek'B�v��',n�m:���s�M���a�cV�E6F���V(��x�|}��੥vDK��0��&6����r�K�c�N+c��!c����?Gѥ�6%����#���J-�P�R��(�u�gu�S2�ҵLH��ED.�h����vR���"�Ih�ۼ�ԫ�� K7����O��E�4�,?�Ơ5����?

Drop down Sub menu disappeared, was working and now is not

I have a horizontal navigation bar with the first link in the navigation bar "products" having a vertical drop down menu. This was working not long ago then when I added more content to this website today the sub menu for "products" disappeared, I do not know how to get it working again or why it stopped working in the first place.
Any ideas??
here is my code:
(the html part is in li class"products" in div id"navigation", and the css part for the sub menu is where I've commented "/products menu/". I've place all the code here as the error happened only after I added more code, it was working before. So maybe I have an error in other parts too which is preventing the sub menu from working, not sure though. )
html:
<body>
<div id="wrapperContainer">
<div id ="container">
<!-- header -->
<div id = "header">
<!-- logo -->
<div id = "logo">
<img src = "images/TelefunkenLogo.png" width="132" height="20"/>
</div>
<!-- close logo -->
<!-- contact/languages/flag -->
<div id = "rightHeader">
<ul>
<li>CONTACT</li>
<li onclick="location.href='#languageContainer';"><a href ="#" >SELECT COUNTRY</a></li>
<li class = "flag"><img src = "images/germany.png"/></li>
</ul>
</div>
<!-- close contact/languages/flag -->
</div>
<!-- close header -->
<!-- drop down language options -->
<div class="languageContainer">
<!-- left options-->
<div id="leftLanguageContainer">
<ul>
<li><img src = "images/england.png"/>INTERNATIONAL - English</li>
<li><a id="selectCountry" href="#"><img src = "images/germany.png"/>DEUTSCHLAND - Deutsch</a></li>
</ul>
</div>
<!-- close left options-->
<!-- cross -->
<a class="closeCross" title="Close" href="#">
<span></span>
</a>
<!-- close cross -->
</div>
<!-- close drop down language options -->
<!-- navigation -->
<div id="navigation">
<!-- menu items -->
<ul class="menu">
<li class="home"><img src="images/homeButton.png" alt="Telefunken"/></li>
<li class="products" >PRODUCTS
<ul class="subMenu">
<li><img src="images/product1.jpg" alt="Telefunken"/>some text</li>
<li><img src="images/product2.jpg" alt="Telefunken"/></li>
<li><img src="images/product3.jpg" alt="Telefunken"/></li>
<li><img src="images/product4.jpg" alt="Telefunken"/></li>
<li><img src="images/product5.jpg" alt="Telefunken"/></li>
<li><img src="images/product6.jpg" alt="Telefunken"/></li>
<li><img src="images/product7.jpg" alt="Telefunken"/></li>
<li><img src="images/product8.jpg" alt="Telefunken"/></li>
<li><img src="images/product9.jpg" alt="Telefunken"/></li>
</ul>
</li>
<li class="company">COMPANY</li>
<li class="service">SERVICE</li>
<li class="news">NEWS</li>
</ul>
<!-- close menu items -->
<!-- search function -->
<div id="searchWrapper">
<div id="search">
<form action="searchresult/" method="post" onsubmit="return searchAction(this)">
<input type="text" name="tx_indexedsearch[sword]" value>
<input type="hidden" id="searchProductUrl" name="searchProductURL" value="searchresultproducts/">
<select name="page"id="selectPage">
<option value="1">WEBSITE</option>
<option value="2">PRODUCTS</option>
</select>
<div id="submitButton">
<input type="submit" value class ="btnSubmit">
</div>
</form>
</div>
</div>
<!-- close search function -->
</div>
<!-- close navigation -->
</div>
<!-- close container -->
<div class="slider" >
<img src="images/sliderBkg.jpg" alt="alt text" width="100%" />
<div id="sliderImages">
<img class="img" style="width:983.5px; margin: 0 auto" src="images/sliderLEDTV.jpg">
<!--<img class="img" style="width:983.5px" src="images/sliderCamcorder.jpg">
<img class="img" style="width:983.5px" src="images/sliderSystemPa.jpg">-->
</div>
</div>
<!-- slider
<div class="slider" style="width:100%;">
<img class="img" style="width:983.5px" src="images/sliderLEDTV.jpg">
</div>-->
<!--<img class="img"src="images/sliderLEDTV.jpg">
<img class="img"src="images/sliderCamcorder.jpg">
<img class="img"src="images/sliderSystemPa.jpg">-->
<!-- close slider -->
<!-- lower content -->
<div id="lowerContent">
<div id="leftContent">
<h1>RECENT PRODUCTS</h1>
<div class="inline"><div id ="product1">
<img src="images/recentProducts1.jpg">
<h2>PORTABLE </br>STEREO RDS RADIO</h2>
<p>Some Text.</p>
<span class=">" style="font-size=0.7em; color:#F00; font-family:'Arial', 'Gill Sans', 'Myriad Pro', 'DejaVu Sans Condensed', Helvetica, Arial, sans-serif;"> > </span> <span class="more" style="color:#000000; font-size:0.7em; font-family:'Arial', 'Gill Sans', 'Myriad Pro', 'DejaVu Sans Condensed', Helvetica, Arial, sans-serif;"> more</span>
</div></div>
<div class="inline"><div id ="product2">
<img src="images/recentProducts2.jpg">
<h2>ICONCERTO </br>I-POD PLAYER</h2>
<p>Some Text.</p>
<span class=">" style="font-size=0.7em; color:#F00; font-family:'Arial', 'Gill Sans', 'Myriad Pro', 'DejaVu Sans Condensed', Helvetica, Arial, sans-serif;"> > </span> <span class="more" style="color:#000000; font-size:0.7em; font-family:'Arial', 'Gill Sans', 'Myriad Pro', 'DejaVu Sans Condensed', Helvetica, Arial, sans-serif;"> more</span>
</div></div>
<div class="inline"><div id ="product3">
<img src="images/recentProducts3.jpg">
<h2>T9HD </br>42" (106 CM) LOREM</h2>
<p>Some Text.</p>
<span class=">" style="font-size=0.7em; color:#F00; font-family:'Arial', 'Gill Sans', 'Myriad Pro', 'DejaVu Sans Condensed', Helvetica, Arial, sans-serif;"> > </span> <span class="more" style="color:#000000; font-size:0.7em; font-family:'Arial', 'Gill Sans', 'Myriad Pro', 'DejaVu Sans Condensed', Helvetica, Arial, sans-serif;"> more</span>
</div></div>
</div>
<div id="rightContent">
</div>
</div>
<!-- close lower content -->
<!-- footer -->
<div id="footer">
</div>
<!-- footer -->
</div>
</body>
css:
#charset "utf-8";
/* CSS Document */
/*all content sits in here*/
#wrapperContainer {
width:100%;
}
#container {
width:983.5px;
margin:0px auto;
}
h1 {
font-family:"Arial", "Gill Sans", "Myriad Pro", "DejaVu Sans Condensed", Helvetica, Arial, sans-serif;
font-size: 1em;
color:#7f7f7f;
}
h2 {
font-family:"Arial", "Gill Sans", "Myriad Pro", "DejaVu Sans Condensed", Helvetica, Arial, sans-serif;
font-size: 0.8em;
color:#000000;
}
p {
font-family:"Arial", "Gill Sans", "Myriad Pro", "DejaVu Sans Condensed", Helvetica, Arial, sans-serif;
font-size: 0.7em;
color:#666666;
}
a:link {
text-decoration:none;
}
a:visited{
text-decoration:none;
}
a:hover{
color:#d34242;
}
/*header*/
#header {
margin: 0 auto;
padding: 20px 0 0px 0;
height: 60px;
width: 983px;
}
/*logo in header*/
#logo {
float: left;
}
/*links to the right of the header*/
#rightHeader {
float: right;
}
/*styling the header links*/
#rightHeader li {
display: inline;
list-style-type: none;
padding: 5px;
border-right:1px solid #dbdbdb;
padding-right:10px;
}
#rightHeader li a:link {
text-decoration: none;
font-size: 12px;;
font-family: "Arial", "Gill Sans", "Myriad Pro", "DejaVu Sans Condensed", Helvetica, Arial, sans-serif;
color: #b2b2b2;
}
#rightHeader li a:visited {
text-decoration: none;
text-size: 0.01em;
font-family: "Arial", "Gill Sans", "Myriad Pro", "DejaVu Sans Condensed", Helvetica, Arial, sans-serif;
color: #b2b2b2;
}
a.selectCountry:hover + .languageContainer {
visibility: visible;
}
#rightHeader li a:hover {
text-decoration: none;
font-family: "Arial", "Gill Sans", "Myriad Pro", "DejaVu Sans Condensed", Helvetica, Arial, sans-serif;
color: #cc0000;
}
/*this is meant to display the language options when you click on 'select country'*/
.languageContainer {
cursor:pointer;
margin: 0 auto;
position:relative;
display:none;
padding: 20px 0 0px 0;
width: 983px;
height: 70px;
border:1px solid #b2b2b2;
}
/*language options*/
#leftLanguageContainer li {
display: inline;
float: left;
padding:30px;
margin-left:-40px;
padding-top:0px;
}
/*language options styling*/
#leftLanguageContainer li a:link {
text-decoration: none;
font-size: 9px;
font-family: "Arial", "Gill Sans", "Myriad Pro", "DejaVu Sans Condensed", Helvetica, Arial, sans-serif;
color: #b2b2b2;
}
#leftLanguageContainer li a:visited {
text-decoration: none;
font-family: "Arial", "Gill Sans", "Myriad Pro", "DejaVu Sans Condensed", Helvetica, Arial, sans-serif;
color: #b2b2b2;
}
#leftLanguageContainer li a:hover {
text-decoration: none;
font-family: "Arial", "Gill Sans", "Myriad Pro", "DejaVu Sans Condensed", Helvetica, Arial, sans-serif;
color: #cc0000;
}
/*cross in the language container*/
a.closeCross {
background-image:url('images/closeCross.png');
display:block;
width:30px;
height:30px;
margin-top:-36px;
float:right;
overflow: hidden;
text-decoration:none;
}
a.closeCross:hover {
background-image:url('images/closeCrossHover.png');
}
/*main navigation*/
#navigation {
background-image:url(images/menuBkg.png);
background-repeat: no-repeat;
height:40px;
width:103%;
z-index:999;
position:absolute;
overflow:hidden;
}
/*setting height of the menu*/
.menu {
height:40px;
}
/*styling the home button*/
.menu li.home {
display:inline;
position:relative;
left:-40px;
top:-25px;
height:43px;
width:40px;
padding:0px;
}
/*products menu*/
.menu li ul.subMenu {
margin:0px;
display:none;
padding:0px;
background:#FFFFFF;
width:985px;
top:40px;
height:250px;
}
.menu li:hover ul.subMenu {
display:block;
width:970px;
}
.menu li li {
list-style:none;
display:list-item;
width:100%;
top:0px;
left:10px;
line-height:2px;
background:#FFFFFF;
}
.menu ul.subMenu li {
display:inline;
list-style:none;
position:relative;
}
.menu li ul.subMenu {
margin:0px;
padding:0px;
display:none;
position:absolute;
}
/* trying to set a width to each 'li' in the subMenu to get the text to move below the image
.menu li ul.subMenu li {
width:10px;
}*/
.subMenu a:hover {
color:#603;
/*border properties*/
}
/*end products menu*/
/*styling individual menu links*/
.products {
border-right: 1px solid #eaeaea;
border-left: 1px solid #c9c9c9;
}
.products:hover {
background-image:url(images/pressed2.jpg);
background-repeat: no-repeat;
top:-40px;
background-size: 120px 40px;
font-color: #FFFFFF;
color: #FFFFFF;
}
.company {
border-right: 1px solid #eaeaea;
border-left: 1px solid #c9c9c9;
width:120px;
}
.company:hover {
background-image:url(images/pressed2.jpg);
background-repeat: no-repeat;
top:-40px;
background-size: 120px 40px;
font-color: #FFFFFF;
color: #FFFFFF;
}
.service {
border-right: 1px solid #eaeaea;
border-left: 1px solid #c9c9c9;
margin-left:-4px;
}
.service:hover {
background-image:url(images/pressed2.jpg);
background-repeat: no-repeat;
top:-40px;
background-size: 120px 40px;
font-color: #FFFFFF;
color: #FFFFFF;
}
.news {
border-right: 1px solid #eaeaea;
border-left: 1px solid #c9c9c9;
margin-left:-4px;
}
.news:hover {
background-image:url(images/pressed2.jpg);
background-repeat: no-repeat;
top:-40px;
background-size: 120px 40px;
font-color: #FFFFFF;
color: #FFFFFF;
}
/*all menu links in navigation bar*/
.menu li {
display:inline;
position:relative;
bottom:45px;
right:50px;
width:130px;
height:43px;
padding:15px;
}
.menu li a:link {
font-family:"Arial", "Gill Sans", "Myriad Pro", "DejaVu Sans Condensed", Helvetica, Arial, sans-serif;
font-size:0.8em;
width:120px;
height:43px;
text-decoration:none;
color: #000000;
}
.menu li a:visited {
font-family:"Arial", "Gill Sans", "Myriad Pro", "DejaVu Sans Condensed", Helvetica, Arial, sans-serif;
font-size:0.8em;
width:120px;
height:43px;
text-decoration:none;
color: #000000;
}
.menu li a:hover {
font-family:"Arial", "Gill Sans", "Myriad Pro", "DejaVu Sans Condensed", Helvetica, Arial, sans-serif;
font-size:0.8em;
text-decoration:none;
color: #FFFFFF;
}
/*search bar in navigation*/
#searchWrapper {
height:100px;
left:212px;
/*float:right;*/
position:relative;
}
#search{
left:80px;
top:70px;
}
/*puts everything in the menu on the same line. */
.menu, #searchWrapper, #search, #submitButton {
display: inline-block;
vertical-align: top;
}
#submitButton {
z-index:1;
}
.btnSubmit {
border:0;
width:40px;
height: 40px;
top:10px;
background-image:url(images/rightArrow.jpg);
}
.btnSubmit:hover {
background-image:url(images/rightArrowPressed.jpg);
}
/*style slideshow*/
.slider {
height: 420px;
overflow:hidden;
}
#sliderImages {
}
/*#slideshow, #navigation {
display: inline-block;
vertical-align: top;
}
#slideshow {
margin-top:-40px;
margin-left: -30px;
}*/
#lowerContent{
margin: 0 auto;
padding: 0px 0 0px 0;
width: 983px;
}
#leftContent {
padding-left:10px;
width:750px;
display:inline;
}
.inline {
float: left;
}
#product1 {
width:240px;
border-right: 1px solid #dbdbdb;
}
#product2 {
width:240px;
padding-left:40px;
border-right: 1px solid #dbdbdb;
}
#product3 {
width:240px;
padding-left:40px;
border-right: 1px solid #dbdbdb;
}

Resources