Tag : Manual


Laravel 5 manual pagination with array example

If you neeed to create custom pagination of your array, you can learn from this post. basically we are doing pagination with model or DB facade like "User::paginate(10)" OR "DB::table('users')->paginate(10)". But now if you have new array and you want to make pagination on your array then you can also give using "LengthAwarePaginator" class see following example: <strong class="example">Example:</strong> <pre class="prettyprint lang-php"> public function myData($userid) { $data = static::get(); <br/> $result = []; if(!empty($data)){ foreach ($data as $key => $value) { .....

By Hardik Savani | March 21, 2016 | | 11000 Viewer | Category : Laravel
READ MORE

    Laravel 5.3 - image dimension validation rules example

    Laravel 5.3 - image dimension validation rules example

    Open Post

    How to create middleware for XSS protection in laravel 5?

    How to create middleware for XSS protection in laravel 5?

    Open Post

    How to get gravatar image from email using Jquery?

    How to get gravatar image from email using Jquery?

    Open Post

    How to create Laravel Resource Controller example?

    How to create Laravel Resource Controller example?

    Open Post

    Laravel 5.3 - Create Bootstrap Contact US Form using Form Request

    Laravel 5.3 - Create Bootstrap Contact US Form using Form Request

    Open Post

    How to implement flash messages in PHP Codeigniter?

    How to implement flash messages in PHP Codeigniter?

    Open Post