| Package Data | |
|---|---|
| Maintainer Username: | gazsp |
| Maintainer Contact: | gpearman@gmail.com (Gary Pearman) |
| Package Create Date: | 2015-06-02 |
| Package Last Update: | 2015-06-02 |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-11-26 03:11:56 |
| Package Statistics | |
|---|---|
| Total Downloads: | 6 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 8 |
| Total Watchers: | 2 |
| Total Forks: | 0 |
| Total Open Issues: | 0 |
Use Cockpit and Laravel Eloquent, together at last. Uses jenssegers/laravel-mongodb.
MongoDB only at the moment
composer require jenssegers/mongodb
composer require gazsp/eloquent-cockpit
Make sure Facades are enabled in app.php, and that the jenssegers/laravel-mongodb service provider is loaded:
$app->withFacades();
// ...
$app->register('Jenssegers\Mongodb\MongodbServiceProvider');
TBC (probably no different from Lumen)
If you have a collection called 'Events' in Cockpit, the model in Laravel or Lumen would be:
<?php namespace App\Repo\Collections;
use Gazsp\EloquentCockpit\CockpitCollection;
class Events extends CockpitCollection {
protected $cockpitSlug = 'events';
}
You can then use the model as normal:
$events = Events::all();
// etc...