Expose Logo

Expose — Share local sites

Invoker

Listing Models

Invoker provides you with a beautiful user interface to browse through your Eloquent models. By selecting the models icon in the navigation bar, Invoker will show you a list of all the Eloquent models that were found in your application, grouped by namespace.

By selecting a model, you will see a table view showing you the model and all of its data.

Scanning Vendor folders#

By default, Invoker does not scan your applications' composer dependencies for additional Eloquent models, for performance reasons. But sometimes you might want to browse models provided by additional packages - such as Laravel Cashier. In this case, you can instruct Invoker to scan your applications composer dependencies for Eloquent models. This can be activated in the Invoker settings.

Customize Visible Columns#

Invoker shows you all available columns that exist in the database table of the selected Eloquent model. If you want to hide certain columns from your table, or change the order of the columns, you can click on the "eye" icon.

You can drag and drop the columns and enable or disable them in order to show/hide them in the table view.

Display Model Accessors#

Invoker allows you to not only see your database columns, but it can also access data and information that you have stored in your Eloquent models - such as custom accessors.

For example, you could add a custom accessor to a Comment model, that will return the word count of the given comment. You can add this to your Comment.php model class, just as you would normally do it with Laravel.

public function getWordCountAttribute()
{
    return str_word_count($this->comment);
}

When you click on the "eye" icon in Invoker, you will now see that there is a word_count accessor available for selection.

After enabling the accessor, Invoker will reload the visible data and show you the accessor value for each of your Comment models.

Quick Edit Single Columns#

To quickly edit a single column for one of your models, you can double-click on the column you want to change to pop up an inline editor. The editor type will depend on the column type that you are editing.

Duplicating Models#

You can duplicate single models in Invoker by using the "Duplicate" menu item from the right-click context menu on the model table view. This will open up the data from the selected model in a modal view.

Before the duplicated model gets persisted to the database, you can make additional changes to the model data and finally save it.

Copying Models as JSON/CSV/PHP#

The context menu of the Invoker model data allows you to copy the selected model(s) into various different output formats: JSON, CSV, HTML table and even PHP.

To copy multiple models at once, either select the models using keyboard shortcuts, such as CMD/CTRL+A, or shift+click the models for multiple selections.

Pagination#

When your database table contains more models than would fit on the current page, Invoker is going to paginate the results automatically. The default amount of models per page is 15. You can modify this value either temporarily on the table itself, using the settings icon on the lower right:

Or you can modify the value globally in the Invoker settings.