Artisan

// Install Voyager
php artisan voyager:install
// Install Voyager with dummy data
php artisan voyager:install --with-dummy
// Make custom HTTP Voyager controllers
php artisan voyager:controllers
// Ensure a user is admin with all permissions
php artisan voyager:admin your@email.com
                

Menu

// Display the "main" menu
Menu::display('main');
// Display the "main" menu with the "bootstrap" style
Menu::display('main', 'bootstrap');
// Display the "main" menu with a custom style
Menu::display('main', 'my_custom_menu_view_file');
                

Built-in Settings

// Get setting value of "Site's Title"
Voyager::setting('site.title');
// Get setting value of "Site's Title" with a default of "No Name"
Voyager::setting('title', 'No Name');
// Get the setting icon_image(Icon used on the main login page and the top of sidebar)
Voyager::setting('admin.icon_image');
// Get the bg_image setting which is used in the login page of the admin panel
Voyager::setting('admin.bg_image');
// Get the google_analytics_client_id which is used in the dashboard page.
Voyager::setting("google_analytics_client_id");
// Get the setting title which is used in the <title> tag of the admin panel
Voyager::setting('admin.title');
// Get the setting description which is used in the <title> tag of the admin panel
Voyager::setting('admin.description');
// Get the setting admin_loader which is used as a loader throughout the admin panel(Get creative with gifs here)
Voyager::setting('admin_loader');
                

Permission

// Check if user have permission "visit-admin"
if ($user->hasPermission('visit-admin')) {}
// Check if user have permission and throw exception if not
Voyager::can('visit-admin');
// Check if user have permission or fail
Voyager::canOrFail('visit-admin');
// Check if user have permission or abort with status code
Voyager::canOrAbort('visit-admin', 401);
                

Validation Rules

accepted
active_url
after:YYYY-MM-DD
before:YYYY-MM-DD
alpha
alpha_dash
alpha_num
array
between:1,10
confirmed
date
date_format:YYYY-MM-DD
different:fieldname
digits:value
digits_between:min,max
boolean
email
exists:table,column
image
in:foo,bar,...
not_in:foo,bar,...
integer
numeric
ip
max:value
min:value
mimes:jpeg,png
regex:[0-9]
required
required_if:field,value
required_with:foo,bar,...
required_with_all:foo,bar,...
required_without:foo,bar,...
required_without_all:foo,bar,...
sometimes|required|field
same:field
size:value
timezone
unique:table,column,except,idColumn
url
                

BREAD Types

// A text box where you can type whatever
Text Box
// A multi-line text area (without a text editor)
Text Area
// A multi-line text area (with a text editor)
Rich Textbox
// A input field with hidden input
Password
// A hidden input field
Hidden
// A check box
Check Box
// A radio button
Radio Button
// A select dropdown without multi-selection
Select Dropdown
// A select dropdown with multi-selection
Multiple Select
// A file upload
File
// A file upload that only accept images
Image
// A input field that only accept a date
Date
// A input field that only accept numbers
Number