Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Before installing Voyager make sure you have installed one of the following versions of Laravel:
Laravel 6
Laravel 7
Laravel 8
Laravel 9
Additionally Voyager requires you to use PHP 7.3 or newer. Laravel requires you to use PHP 8 or newer when using Laravel 9.
Before installing Voyager it is very important to take a quick moment to learn what it is & what it isn't.
An admin interface for your Laravel app
An easy way to add/edit/delete data for your app
A menu builder (build menus in Voyager for your app)
A media manager for your files
CRUD/BREAD generator (learn more about BREAD here)
Voyager is simply an admin for your Laravel app. Whatever you want your app to do on the front-end is completely up to you. You are in control of your application and you can use Voyager to make your life easier by adding data, editing users, creating menus, and many other administrative tasks.
A content management system (CMS)
A blogging platform
Wordpress (Bleh! 😜)
Voyager is not a CMS or a blogging platform. But it can be used to create a CMS or a blogging platform, but out of the box it is neither of those. As stated in the previous section you have full control on what your application will do and how it will function.
With Laravel & Voyager you can create any kind of application your heart desires. Laravel & Voyager are simply tools to make it easier to build.
Welcome to the Voyager documentation for version 1.5. This documentation will teach you how to install, configure, and use Voyager so that way you can create some kick ass stuff!
Hm Hm (cough)… I mean… Arrgg! Ye young scallywag! What say we learn how to steer this ship!
Before installing Voyager you may want to take a quick moment to learn what it is and what it isn't, we'll do that in the next section.
To update to the latest version inside of your composer.json file make sure to update the version of Voyager inside the require declaration of your composer.json to:
tcg/voyager": "1.5.*
And then run composer update
Version 1.5 removes the hooks functionality.
If you use any hooks, either skip this release or convert them to regular composer packages.
Another way is to disable ssl verification in your composer.json
:
If you do not use any hooks, you don't have to take any actions!
Be sure to ask us on our slack channel if you are experiencing any issues and we will try and assist. Thanks.
Using the BREAD builder you can easily create Relationships between tables. At the bottom of the page you will see a new button that says 'Create Relationship'
Notice If you have not yet created the BREAD for the table yet, it will need to be created first and then you can come back after creating the BREAD to add the relationship. Otherwise you'll end up with a notification which looks like the following.
So, after the BREAD has already been created you will then be able to create a new relationship. After you click on the 'Create a Relationship' button. You will see a new Modal window that looks like the following:
You will first specify which type of relationship this is going to be, then you will select the table you are referencing and which Namespace that belongs to that table. You will then select which row combines those tables.
You can also specify which columns you would like to see in the dropdown or the multi-select.
Now, you can easily create belongsTo
, belongsToMany
, hasOne
, and hasMany
relationships directly in Voyager.
If you need to set advanced options for belongsToMany
relationship you can set, after saving relationship, these parameters in details field:
You can sort the results of a relationship by setting the sort
object in the relationship options:
Or
To sort by my_field
descending.
And add the following to the relationship options:
The value is the name of your scope-method without the word scope
.
The value for scopeActive()
is active
. For scopeSomeUsers()
it is someUsers
.
In a BelongsTo relationship the foreign key field decides if value can be saved on add or edit and applies validation rules for everything else, like visibility in browse and edit, the relationship field is used.
You can easily filter the shown relationship options by defining a in the foreign model. For example, if you want to only show active entries, create a scope like: