Servage Magazine

Information about YOUR hosting company – where we give you a clear picture of what we think and do!

Voyager admin tool for Laravel

Tuesday, March 21st, 2017 by Servage

Screen Shot 2017-01-25 at 10.50.20Laravel, the most popular PHP framework, has recently got an alternative way to manage the framework. Voyager is a graphical admin tool that lets developers to create new models, media, menus and more with a GUI instead of a text-based terminal. Let’s go through the features in more detail and see how you can install Voyager for your own web application powered by Laravel.

Content Management Using BREAD

One of Voyager’s main features is the ability to manage the content of your application using a graphical user interface. By default, you can manage users, user roles, media, pages and posts. Voyager uses BREAD functions to do this, which stands for browsing, reading, editing, adding and deleting database records.

This means you can do all of the five most common database actions using a graphical user interface. You can browse through the content, such as users or media, of your application and edit the data using a simple but powerful graphical user interface.

If you application does not use the default models, such as posts, you can delete the posts management page from Voyager. Most importantly, you can create your own models and use the above BREAD functions with them.

Managing Custom Models and Database Tables

Let’s imagine you are working on an online shop and you need a product model and an associated database table. You could create these by hand using Artisan, the command-line interface of Laravel. However, you can also do all of this using Voyager. You can create a new database table and define its columns with Voyager. For example, if you were to create a products table, you can add a product description that is of type TEXT and give it a default value, just like you would do when creating a new database migration in Laravel.

When doing this manually, you would also have to create a model for the database table. Voyager can do this automatically for you just by checking a checkbox.

Installing Voyager

Integrating such a feature-rich extension with your existing application sounds quite complicated. Fortunately, setting up Voyager is incredibly simple! To do this, first you have to require the package with Composer: composer require tcg/voyager. The next step is to include    TCG\Voyager\VoyagerServiceProvider::class in the providers array of your config/app.php file so that Laravel can find the package. The last step is to install Voyager using Artisan: php artisan voyager:install. You can now access Voyager by going to the “/admin” URL of your application.

Voyager might seem like a complex topic so it is recommended to give it a try yourself to see better how it works. To sum up Voyager in a few words, it allows you to do common database management actions easily with a graphical user interface. It is not a replacement for Artisan but makes certain Artisan and database-related tasks easier for you.

Voyager admin tool for Laravel, 3.7 out of 5 based on 3 ratings
Categories: Software & Webapps

Keywords: ,

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

No comments yet (leave a comment)

You are welcome to initiate a conversation about this blog entry.

Leave a comment

You must be logged in to post a comment.