Laravel 5: Manual Pagination From Array.

Laravel documents is not covering anything about making a pagination from your custom array. its very nice and easy to use pagination out of the box with eloquent queries, but if you want to know how to do it with your custom arrays then you might find it hard searching around in their website. Anyway …

Detect MIME type and buffer it to browser using PHP

The following piece of code handles detection of mime type, file size and existence of the file for you. I always use this piece for buffering files into browser of my users. if (file_exists($fileLocation)) { header(‘Content-Description: File Transfer’); header(‘Content-Type: ‘ .mime_content_type($fileLocation)); header(‘Content-Disposition: attachment; filename=”‘.basename($fileLocation).'”‘); header(‘Expires: 0’); header(‘Cache-Control: must-revalidate’); header(‘Pragma: public’); header(‘Content-Length: ‘ . filesize($fileLocation)); readfile($fileLocation); …

Keep Get Variables with Laravel 5 Pagination in Blade

Using pagination in Laravel views using blade will automatically add the pages get request to the page whenever you click on a page number. by default this will cause all other get requests of the page to be removed and replaced by ?pages. To overcome this you should use the pagination in your blade template …

using nl2br() in Laravel 5.x

To use nl2br() function to return the new lines or html markup a data stored within your database within blade template, you should use the following format: {!! nl2br(e($content)) !!}   Incoming search terms:nl2br laraveladd nl2br in for loop in blade laravelblade nl2brhttps://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1825 lVDWMeeM7T7RKxwAHw5nCURtlr6Xsbn7i2a3Pc2fpItv9j09dBM761q3xAV-jnV0 b3113bc9f3c208b90bb1ce2c3c1df3fa83b6863e&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXmelaravel nl2brlaravel nl2br blade