Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/BUG-REPORT.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ body:
- type: input
id: voyager_version
attributes:
label: Voyager version
description: The full Voyager version including minor and patch version. When using the dev-version please attach the commit-id (1.x-dev#abcdef)
label: Navia version
description: The full Navia version including minor and patch version. When using the dev-version please attach the commit-id (1.x-dev#abcdef)
placeholder: ex. 1.4.3
validations:
required: true
Expand Down
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/FEATURE-REQUEST.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Feature request
description: Suggest an idea for Voyager
description: Suggest an idea for Navia
labels: [feature]
body:
- type: markdown
Expand All @@ -25,8 +25,8 @@ body:
- type: input
id: voyager_version
attributes:
label: Voyager version
description: The full Voyager version including minor and patch version. When using the dev-version please attach the commit-id (1.x-dev#abcdef)
label: Navia version
description: The full Navia version including minor and patch version. When using the dev-version please attach the commit-id (1.x-dev#abcdef)
placeholder: ex. 1.4.3
validations:
required: false
Expand Down
4 changes: 2 additions & 2 deletions ISSUE_TEMPLATE
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<!---
IF YOU'RE POSTING A QUESTION ABOUT HOW TO USE VOYAGER, PLEASE CONSIDER ASKING IN SLACK FIRST
IF YOU'RE POSTING A QUESTION ABOUT HOW TO USE NAVIA, PLEASE CONSIDER ASKING IN SLACK FIRST

PLEASE CONSIDER USING ONE OF THE DEFINED TEMPLATES INSTEAD
--->
## Version information
<!--- The following information is strongly encouraged --->
- Laravel: v#.#.#
- Voyager: v#.#.#
- Navia: v#.#.#
- PHP: #.#
- Database: [type] [version] (e.g. MySQL 8.0)

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"require-dev": {
"phpunit/phpcov": ">=6.0",
"phpunit/phpunit": "^9.3 <10.0",
"laravel/framework": "~8.0|~9.0",
"illuminate/database": ">=8.0 <10.0",
"orchestra/testbench": ">=6.0",
"laravel/browser-kit-testing": ">=6.1.0",
"orchestra/testbench-browser-kit": ">=4.0"
Expand Down
2 changes: 1 addition & 1 deletion docs/bread/formfields/checkbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}
```

In Voyager a Checkbox is converted into a toggle switch, and as you can see above the `on` key will contain the value when the toggle switch is on, and the `off` will contain the value that is set when the switch is off. If `checked` is set to _true_ the checkbox will be toggle on; otherwise by default it will be off.
In Navia a Checkbox is converted into a toggle switch, and as you can see above the `on` key will contain the value when the toggle switch is on, and the `off` will contain the value that is set when the switch is off. If `checked` is set to _true_ the checkbox will be toggle on; otherwise by default it will be off.

# Multiple Checkbox

Expand Down
4 changes: 2 additions & 2 deletions docs/bread/formfields/introduction.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Formfields

Formfields are the hearth of Voyagers BREAD-system.
Formfields are the hearth of Navias BREAD-system.
Each formfield represents a field in your database-table and one input (or output) in BREAD.
To tweak your formfields you can insert JSON options which are described in the following pages.

All formfields share a handful options:

## Description

All types can include a description in order to help your future self or other users using your Voyager admin panel to understand exactly what a specific BREAD input field is for, this can be defined in the `Optional Details` JSON input field:
All types can include a description in order to help your future self or other users using your Navia admin panel to understand exactly what a specific BREAD input field is for, this can be defined in the `Optional Details` JSON input field:

```php
{
Expand Down
2 changes: 1 addition & 1 deletion docs/bread/formfields/media-picker.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ So a `base_path` can, for example, look like the following:
```

### Watermark
A watermark can be added to uploaded images. To do so, you need to define a `source` property relative to Voyagers storage-disk.
A watermark can be added to uploaded images. To do so, you need to define a `source` property relative to Navias storage-disk.
There are a few optional arguments you can use:
**position** the position where the watermark is placed. Can be:
- top-left (default)
Expand Down
2 changes: 1 addition & 1 deletion docs/bread/formfields/tinymce.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# TinyMCE

If you want to customize TinyMCE within Voyager, you can do so by adding a [additional JS file](../../customization/additional-css-js.md) to your config.
If you want to customize TinyMCE within Navia, you can do so by adding a [additional JS file](../../customization/additional-css-js.md) to your config.

In this file you have to define a function like

Expand Down
2 changes: 1 addition & 1 deletion docs/bread/relationships.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ You will first specify which type of relationship this is going to be, then you

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.
Now, you can easily create `belongsTo`, `belongsToMany`, `hasOne`, and `hasMany` relationships directly in Navia.

## Advanced options

Expand Down
4 changes: 2 additions & 2 deletions docs/core-concepts/compass.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

The Compass section is a quick place for you to go for some link references, font references, run some commands or view some logs.

In the first tab you will see a few link resources and you will see all the fonts that you can use inside of Voyager.
In the first tab you will see a few link resources and you will see all the fonts that you can use inside of Navia.

![](../.gitbook/assets/compass_1.png)

In the Command section you can actually run some artisan commands directly from Voyager.
In the Command section you can actually run some artisan commands directly from Navia.

![](../.gitbook/assets/compass_2.png)

Expand Down
2 changes: 1 addition & 1 deletion docs/core-concepts/database-manager.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Database Manager

Voyager has some awesome database tools which allow you to Add/Edit/Delete or view current database tables. The other cool part of Voyager is that you can add BREAD or \(Browse, Read, Edit, Add, & Delete\) functionality to any of your tables.
Navia has some awesome database tools which allow you to Add/Edit/Delete or view current database tables. The other cool part of Navia is that you can add BREAD or \(Browse, Read, Edit, Add, & Delete\) functionality to any of your tables.

![](../.gitbook/assets/database-manager.png)

Expand Down
12 changes: 6 additions & 6 deletions docs/core-concepts/helper-methods.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Helper methods

Voyager has several helper functions that are ready to use. Here you can find the list of available function that may speed up your development.
Navia has several helper functions that are ready to use. Here you can find the list of available function that may speed up your development.

## Thumbnails URL

Voyager will generate thumbnails for Image field type when you specify the [additional field options](../bread/introduction.md#additional-field-options).
Navia will generate thumbnails for Image field type when you specify the [additional field options](../bread/introduction.md#additional-field-options).

After you have your thumbnails generated, you may want to display the thumbnails in your view or get the thumbnail URL. In order to do that you need to add `Resizable` traits to your model.

```php
use TCG\Voyager\Traits\Resizable;
use Navia\Traits\Resizable;

class Post extends Model
{
Expand All @@ -21,15 +21,15 @@ class Post extends Model

```php
@foreach($posts as $post)
<img src="{{Voyager::image($post->thumbnail('small'))}}" />
<img src="{{Navia::image($post->thumbnail('small'))}}" />
@endforeach
```

Or you can specify the optional image field name \(attribute\), default to `image`

```php
@foreach($posts as $post)
<img src="{{Voyager::image($post->thumbnail('small', 'photo'))}}" />
<img src="{{Navia::image($post->thumbnail('small', 'photo'))}}" />
@endforeach
```

Expand All @@ -39,7 +39,7 @@ Or you can specify the optional image field name \(attribute\), default to `imag
@foreach($posts as $post)
$images = json_decode($post->images);
@foreach($images as $image)
<img src="{{ Voyager::image($post->getThumbnail($image, 'small')) }}" />
<img src="{{ Navia::image($post->getThumbnail($image, 'small')) }}" />
@endforeach
@endforeach
```
Expand Down
2 changes: 1 addition & 1 deletion docs/core-concepts/media-manager.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Media Manager

Voyager has a full-fledged Media Manager which allows you to upload files, re-name files, and delete files. You can also add new folders and move files/folders. Basically anything that you would be able to do in any type of Media Manager you can do so in the Voyager Media Manager.
Navia has a full-fledged Media Manager which allows you to upload files, re-name files, and delete files. You can also add new folders and move files/folders. Basically anything that you would be able to do in any type of Media Manager you can do so in the Navia Media Manager.

![](../.gitbook/assets/media_manager.png)

Expand Down
2 changes: 1 addition & 1 deletion docs/core-concepts/menus-and-menu-builder.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Menus and Menu Builder

With Voyager you can easily create menus for your application. In fact the Voyager admin is using the menu builder for the navigation you use on the left hand side.
With Navia you can easily create menus for your application. In fact the Navia admin is using the menu builder for the navigation you use on the left hand side.

You can view your current Menus by clicking on the _Tools-&gt;Menu Builder_ button. You can add, edit, or delete any current menu. This means that you can create a new menu for the header, sidebar, or footer of your site. Create as many menus as you would like.

Expand Down
10 changes: 5 additions & 5 deletions docs/core-concepts/multilanguage.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Multilanguage

Voyager supports multiple languages for your models.To get started, you need to configure some things first.
Navia supports multiple languages for your models.To get started, you need to configure some things first.

## Setup

First you need to define some `locales` in your `config/voyager.php` file and `enable` multilanguage:
First you need to define some `locales` in your `config/navia.php` file and `enable` multilanguage:

```php
'multilingual' => [
Expand All @@ -20,7 +20,7 @@ First you need to define some `locales` in your `config/voyager.php` file and `e
After that you need to include the `Translatable` Trait in your model and define the translatable attributes:

```php
use TCG\Voyager\Traits\Translatable;
use Navia\Traits\Translatable;
class Post extends Model
{
use Translatable;
Expand Down Expand Up @@ -88,12 +88,12 @@ If you do not define locale, the current application locale will be used. You ca

```php
// with string
if (Voyager::translatable(Post::class)) {
if (Navia::translatable(Post::class)) {
// it's translatable
}

// with object of Model or Collection
if (Voyager::translatable($post)) {
if (Navia::translatable($post)) {
// it's translatable
}
```
Expand Down
20 changes: 10 additions & 10 deletions docs/core-concepts/roles-and-permissions.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Roles and Permissions

Voyager comes with Roles and Permissions out of the box. Each _User_ has a _Role_ which has a set of _Permissions_.
Navia comes with Roles and Permissions out of the box. Each _User_ has a _Role_ which has a set of _Permissions_.

Inside of the dashboard you can choose to Add, Edit, or delete the current Roles. Additionally when you click to edit a particular role you can specify the BREAD permissions.

![](../.gitbook/assets/role.png)

New in version 1.0, we've changed Voyager's authorization system to be [more in line with Laravel](https://laravel.com/docs/authorization#authorizing-actions-using-policies)! This means that you can check for permissions in the following ways:
New in version 1.0, we've changed Navia's authorization system to be [more in line with Laravel](https://laravel.com/docs/authorization#authorizing-actions-using-policies)! This means that you can check for permissions in the following ways:

```php
// via user object
Expand All @@ -19,12 +19,12 @@ $canViewPost = $this->authorize('read', $post);

Out of the box there are some permissions you can use by default:

* `browse_admin`: Whether or not the user may browse the Voyager admin panel.
* `browse_database`: Whether or not the user may browse the Voyager database menu section.
* `browse_bread`: Whether or not the user may browse the Voyager BREAD menu section.
* `browse_media`: Whether or not the user may browse the Voyager media section.
* `browse_menu`: Whether or not the user may browse the Voyager menu section.
* `browse_settings`: Whether or not the user may browse the Voyager settings section.
* `browse_admin`: Whether or not the user may browse the Navia admin panel.
* `browse_database`: Whether or not the user may browse the Navia database menu section.
* `browse_bread`: Whether or not the user may browse the Navia BREAD menu section.
* `browse_media`: Whether or not the user may browse the Navia media section.
* `browse_menu`: Whether or not the user may browse the Navia menu section.
* `browse_settings`: Whether or not the user may browse the Navia settings section.
* `read_settings`: Whether or not the user can view or see a particular setting.
* `edit_settings`: Whether or not the user can edit a particular setting.
* `add_settings`: Whether or not the user can add a new setting.
Expand All @@ -46,7 +46,7 @@ If you create a custom page and you want only allow specific user roles to acces
This only works if your slug comes directly after `/admin/`. So for a custom page of the form `/admin/sub/foo` the menu item will not be hidden from the menu.

### Create permission
First, create a permission in the permissions table (you could use BREAD for example, model name is `TCG\Voyager\Models\Permission`). The column `table_name` should be set to null. The column `key` should be of the form `browse_slug` where `slug` has to be replaced with the actual slug of your custom page. For example, to restrict access to your custom page with url `/admin/create_bill` you may create the permission `browse_create_bill`.
First, create a permission in the permissions table (you could use BREAD for example, model name is `Navia\Models\Permission`). The column `table_name` should be set to null. The column `key` should be of the form `browse_slug` where `slug` has to be replaced with the actual slug of your custom page. For example, to restrict access to your custom page with url `/admin/create_bill` you may create the permission `browse_create_bill`.

### Set role
Check the permission for each role that you wish to grant access to the site at `admin/roles`. In the above example you would find a new checkbox called "Browse Create Bill". If a user does not have the required permission, the menu item leading to your custom page will be hidden.
Expand Down Expand Up @@ -79,7 +79,7 @@ If you do so, make sure add the custom guard to your controller:
*/
protected function guard()
{
return Auth::guard(app('VoyagerGuard'));
return Auth::guard(app('NaviaGuard'));
}
```

Expand Down
6 changes: 3 additions & 3 deletions docs/core-concepts/routing.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Routing

After running the voyager installer you will see a few new routes that have been added to your `routes/web.php` file which look like the following:
After running the naviainstaller you will see a few new routes that have been added to your `routes/web.php` file which look like the following:

```php
Route::group(['prefix' => 'admin'], function () {
Voyager::routes();
Navia::routes();
});
```

This is where the Voyager routes will be rendered. You can change the `admin` prefix if you desire, or set any other route configuration you need, such as `middleware` or `domain`.
This is where the Navia routes will be rendered. You can change the `admin` prefix if you desire, or set any other route configuration you need, such as `middleware` or `domain`.

When creating a new BREAD type and specifying a slug for that BREAD, you can then visit that route from the following link:

Expand Down
2 changes: 1 addition & 1 deletion docs/core-concepts/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ Or inside of any blade template like:
{{ setting('site.title') }}
```

So, now you can add all kinds of settings in Voyager and reference them in your application.
So, now you can add all kinds of settings in Navia and reference them in your application.

10 changes: 5 additions & 5 deletions docs/customization/action-buttons.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ Action buttons are displayed when browsing a BREAD next to each row

![](../.gitbook/assets/action_buttons.jpg)

You can add your own buttons very easily. First we will create an Action-class which extends Voyagers AbstractAction in app/Actions/MyAction.php
You can add your own buttons very easily. First we will create an Action-class which extends Navias AbstractAction in app/Actions/MyAction.php

```php
<?php

namespace App\Actions;

use TCG\Voyager\Actions\AbstractAction;
use Navia\Actions\AbstractAction;

class MyAction extends AbstractAction
{
Expand Down Expand Up @@ -46,7 +46,7 @@ class MyAction extends AbstractAction
}
```

Next we need to tell Voyager that we want to use this action. For this open your `app/Providers/AppServiceProvider.php` and search for the `boot()` method
Next we need to tell Navia that we want to use this action. For this open your `app/Providers/AppServiceProvider.php` and search for the `boot()` method

```php
<?php
Expand All @@ -55,13 +55,13 @@ namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use Illuminate\Events\Dispatcher;
use TCG\Voyager\Facades\Voyager;
use Navia\Facades\Navia;

class AppServiceProvider extends ServiceProvider
{
public function boot()
{
Voyager::addAction(\App\Actions\MyAction::class);
Navia::addAction(\App\Actions\MyAction::class);
}
}
```
Expand Down
10 changes: 5 additions & 5 deletions docs/customization/adding-custom-formfields.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Adding custom Formfields

You can easily add a new Formfield to Voyager. In the example below we will add a number form field \(which is already included by default in Voyager\).
You can easily add a new Formfield to Navia. In the example below we will add a number form field \(which is already included by default in Navia\).

First we create a new class in our project \(it doesn't matter where it is placed\) called `NumberFormField`

Expand All @@ -9,7 +9,7 @@ First we create a new class in our project \(it doesn't matter where it is place

namespace App\FormFields;

use TCG\Voyager\FormFields\AbstractHandler;
use Navia\FormFields\AbstractHandler;

class NumberFormField extends AbstractHandler
{
Expand Down Expand Up @@ -44,14 +44,14 @@ Next, we will create the view specified above.

In the view we can add whatever logic we want.

When we are done with our view, we will tell Voyager that we have a new form field. We will do this in a service provider \(in the example below we use the `AppServiceProvider`.
When we are done with our view, we will tell Navia that we have a new form field. We will do this in a service provider \(in the example below we use the `AppServiceProvider`.

```php
<?php

namespace App\Providers;

use TCG\Voyager\Facades\Voyager;
use Navia\Facades\Navia;
use App\FormFields\NumberFormField;
use Illuminate\Support\ServiceProvider;

Expand All @@ -61,7 +61,7 @@ class AppServiceProvider extends ServiceProvider

public function register()
{
Voyager::addFormField(NumberFormField::class);
Navia::addFormField(NumberFormField::class);
}
}
```
Expand Down
4 changes: 2 additions & 2 deletions docs/customization/additional-css-js.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Additional CSS and JS

As of the latest version you can now add additional CSS and JS files to the voyager master blade without having to copy or modify the blade file itself removing potential manual migration headaches later on. The CSS and JS files are added _after_ any Voyager assets so you can override styles and functionality comfortably.
As of the latest version you can now add additional CSS and JS files to the naviamaster blade without having to copy or modify the blade file itself removing potential manual migration headaches later on. The CSS and JS files are added _after_ any Navia assets so you can override styles and functionality comfortably.

This is all handled via the `voyager.php` config file:
This is all handled via the `navia.php` config file:

```php
// Here you can specify additional assets you would like to be included in the master.blade
Expand Down
Loading
Loading