Skip to content

Instantly share code, notes, and snippets.

View stevenay's full-sized avatar

Nay Lin Aung stevenay

View GitHub Profile
@stevenay
stevenay / paginate.php
Created March 19, 2018 10:09 — forked from vluzrmos/paginate.php
Laravel Paginate Collection or Array
<?php
/**
* Gera a paginação dos itens de um array ou collection.
*
* @param array|Collection $items
* @param int $perPage
* @param int $page
* @param array $options
*
* @return LengthAwarePaginator
<?php
# -- In Object Oriented Programming, Classes have attributes specified already even before start coding.
# -- Therefore, in this Class, the attributes are specified explicitly.
# -- Use PHP Magic methods --get and --set
class Courier{
private $name;
private $duty;
<?php
class Courier{
public $name;
public $country;
public function __construct($name,$country)
{
$this->name = $name;