src/Label305/AujaLaravel/Auja.php
public function singleAssociationMenuFor($model, $modelId, Relation $relation, ModelConfig $config = null) {
        $modelName = $this->resolveModelName($model);

        $menuFactory = $this->app->make('Label305\AujaLaravel\Factory\SingleAssociationIndexMenuFactory');
        /* @var $menuFactory SingleAssociationIndexMenuFactory */
        return $menuFactory->create($modelName, $modelId, $relation, $config);
    }
public function singleAssociationMenuFor($model, $modelId, Relation $relation, ModelConfig $config = null) {
        $modelName = $this->resolveModelName($model);

        $menuFactory = $this->app->make('Label305\AujaLaravel\Factory\SingleAssociationIndexMenuFactory');
        /* @var $menuFactory SingleAssociationIndexMenuFactory */
        return $menuFactory->create($modelName, $modelId, $relation, $config);
    }
Builds a menu for a single model entry, where the model has exactly one relationship with another model.

The menu will include:
- An Edit LinkMenuItem;
- A SpacerMenuItem with the name of the associated model;
- A ResourceMenuItem to hold entries of the associated model.

@param Controller|Eloquent|String $model    An object which represents the model to build items for.
@param int                        $modelId  The id of the model entry.
@param Relation                   $relation The Relation this model has with the associated model.
@param ModelConfig                $config   (optional) The `ModelConfig` to use.

@return Menu the `Menu`, which can be configured further.