PHPackages                             ethosce/lookmlphp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. ethosce/lookmlphp

ActiveLibrary

ethosce/lookmlphp
=================

write lookml with php

v0.1-alpha(7y ago)36.3k↑60.7%PHP

Since Dec 3Pushed 3y ago2 watchersCompare

[ Source](https://github.com/ethosce/lookmlphp)[ Packagist](https://packagist.org/packages/ethosce/lookmlphp)[ RSS](/packages/ethosce-lookmlphp/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

LookMLphp
=========

[](#lookmlphp)

Write LookML with PHP for [Looker](https://looker.com)

LookML is based off of YAML, but it is not YAML.

This library will allow you generate LookML with PHP.

Installation
------------

[](#installation)

`composer require  ethosce/lookmlphp:dev-master`

Usage
-----

[](#usage)

LookMLphp is designed to be very flexible but provide convenience when possible.

See `example.php` for a full usage example.

### Create a model

[](#create-a-model)

```
require_once 'vendor/autoload.php';
use LookML\Model;

// Define the model and connection
$model = new Model();
$model->set('connection', 'pgsql');

// Comments and includes
$model->comment('include all the views');
$model->set('include', '*.view');
$model->comment('include all the dashboards');
$model->set('include', '*.dashboard');

// Explore on orders
$order = $model->explore('order');
$order->set('label', 'Orders');
$order->join('users')
    ->set('foreign_key', 'uid')
    ->set('relationship', 'many_to_one');

// Explore on users
$user = $model->explore('user')
  ->set('label', 'Users');

// Render LookML
print $model;
```

### Create a view

[](#create-a-view)

```
require_once 'vendor/autoload.php';
use LookML\View;

$user = new View('user');
$user->dimension('uid')
  ->set('type', 'number');
$user->dimension('name')
  ->set('type', 'string');
// Render the view.
print $user;

$order = new View('order');

$order = new View('order');
$order->dimension('order_id')
  ->set('type', 'number');
print $order;
```

### Todo

[](#todo)

- Formatting/indenting

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2715d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/045812752f737fb2e68e29bf9689e244792e5226973916f2fe4ec5386d648101?d=identicon)[djdevin](/maintainers/djdevin)

---

Top Contributors

[![djdevin](https://avatars.githubusercontent.com/u/418136?v=4)](https://github.com/djdevin "djdevin (9 commits)")

---

Tags

lookerphpsyntax

### Embed Badge

![Health badge](/badges/ethosce-lookmlphp/health.svg)

```
[![Health](https://phpackages.com/badges/ethosce-lookmlphp/health.svg)](https://phpackages.com/packages/ethosce-lookmlphp)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
