Illuminate\Database\Query\Builder::get PHP Method

get() public method

Execute the query as a "select" statement.
public get ( array $columns = ['*'] ) : Collection
$columns array
return Illuminate\Support\Collection
    public function get($columns = ['*'])
    {
        $original = $this->columns;
        if (is_null($original)) {
            $this->columns = $columns;
        }
        $results = $this->processor->processSelect($this, $this->runSelect());
        $this->columns = $original;
        return collect($results);
    }

Usage Example

 /**
  * Get records from the database.
  *
  * @param int $per_page
  *
  * @return Collection
  */
 public function get($per_page = 20)
 {
     $this->per_page = $per_page;
     $this->buildQuery();
     return $this->query->get();
 }
All Usage Examples Of Illuminate\Database\Query\Builder::get