Wave Upgrade to Laravel 5.8 and Voyager 1.2

tnylea

April 2, 2019 09:23 PM

You can download the latest version of Wave which has been updated from Laravel 5.6 to 5.8. Voyager 1.0 has been upgraded to 1.2.

It's a pretty simple update, here are the steps to update. Also documented in the documentation:

Upgrade Steps


  1. Update DEPENDENCIES
composer update

  1. Voyager::can function is no longer available (has been replaced)

Inside of the 2 following files: resources/views/themes/bootstrap/layouts/app.blade.php resources/views/themes/uikit/layouts/app.blade.php

Change any instances of

Voyager::can('browse_admin')

to

!auth()->guest() && auth()->user()->can('browse_admin')

  1. (optional) roles id changed from integer to bigInteger

Possible option. In Voyager 1.2 the id in the roles table has changed from integer to bigInteger, so you may need to change role_id inside of the plans table to be of type bigInteger instead of integer.

Here is the file that was changed: wave\database\migrations\2018_09_22_234251_create_plans_table.php

line 22 was changed from:

$table->integer('role_id')->unsigned()->index('plans_role_id_foreign');

to:

$table->bigInteger('role_id')->unsigned()->index('plans_role_id_foreign');

Enjoy :) Thanks!

Select One:
padrio

April 3, 2019 05:40 AM

Thank you very much! All steps are reproducable, but I've got some questions regarding the last step. Since the role_id type been changed to bigInt, why aren't you changing all FKs pointing onto it? Like user.role_id or user_roles.role_id

Select One:
farid-bouchdak

April 4, 2019 06:07 AM

Thanks Tony! My knowledge of programming is limited to copy&paste code. So this is what i did to upgrade my existing project:

  1. download Wave RC10 and unzip the file;
  2. remove existing wave directory in root of my existing project and remove composer.json;
  3. copy wave directory and composer.json from Wave RC10 to my existing project;
  4. update dependencies in CLI [composer update];
  5. change any "Voyager::can" instances in app.blade.php as described in your upgrade-instructions;
  6. clear ALL cache in CLI [php artisan optimize && php artisan cache:clear && php artisan route:cache && php artisan view:clear && php artisan config:cache]
Select One:
farid-bouchdak

April 4, 2019 06:17 AM

the only thing i didnt manage to get working yet is chatter and wave RC9 or RC10. i believe it is a javascript thingy, because i cant create or edit or delete a discussion. every solution that i found about js didnt solve my problem.

Select One:
fabio-pinto

April 8, 2019 12:14 PM

+1 @marx This happens on a fresh RC10 install too

@tnylea FYI

Select One:
jahangir-mohammed

April 8, 2019 06:52 PM

all fields are required except Additional Roles, if any field is empty then this bug comes into play.

Select One:
jahangir-mohammed

April 15, 2019 08:19 PM

@marx you are correct

Select One:
mark-co

May 13, 2019 09:15 AM

Hi, a workaround I found is this:

add this to app\User.php:

public function setSettingsAttribute($value) { $this->attributes['settings'] = $value ? $value->toJson() : null; }

and then edit the BREAD for the user and put App\User as the model.

Select One:
jamesconnally84

November 19, 2020 03:43 PM

Thank you so much tnylea. I have installed the last version of Laravel for site https://bestessayservicesradar.com/topessaywriting-review/ following your steps and everything works well. Hope user.role_id will be changed with all FKs and of course, waiting for the new update.

Select One:
annaadarden

April 9, 01:58 AM

Hey, thank you for providing this information here on this platform. Whoever wants to know about it must read it here. If you are searching for the best essay writing services then you have to choose very wisely. Firstly read the whole reviews of the website before taking their services. I can recommend you to visit https://www.ihatewritingessays.com/grabmyessay-com-review. Here firstly read the reviews about the website providing these services then make your decision which services you want to afford.

Select One:
Write
Preview
Help

Markdown Basics

DevDojo uses Markdown syntax for writing posts, commments, and other content throughout the site. Below you will find some commonly used markdown syntax. For a deeper dive in Markdown check out this Cheat Sheet


Bold & Italic

Italics *asterisks*

Bold **double asterisks**


Code

Inline Code `backtick`

Code Block

```
Three back ticks and then enter your code blocks here.
```

Headers

# This is Heading 1
## This is Heading 2
### This is Heading 3
#### This is Heading 4
##### This is Heading 5

Here is an example of how each heading will looks

Heading 1

Heading 2

Heading 3

Heading 4
Heading 5

Quotes

> type a greater than sign and start typing your quote.

Links

You can add links by typing the alt text inside of [] and the link inside of (), like so:

[links](https://devdojo.com)

Images

You can add images by selecting the image icon, which will upload and add an image to the editor, or you can manually add the image by adding an exclamation !, followed by the alt text inside of [], and the link inside of (), like so:

![alt text for image](https://cdn.devdojo.com/images/image.png)

Embedding Codepens

You can also embed a codepen pen by writing the following:

{% codepen https://codepen.io/your/pen/url %}

You may also choose the default tabs you wish to show your pen by writing the default-tab like so: (default is result)

{% codepen https://codepen.io/your/pen/url default-tab=result,html %}


Embedding YouTube Videos

You can also embed a YouTube video by writing the following:

{% youtube VIDEO_ID_HERE %}


Embedding Katacoda Terminal

You can also embed a Katacoda Terminal by writing the following:

{% katacoda %}

You may also choose if the terminal should float at the bottom of the page or be embeded in the post itself by writing float like so:

{% katacoda float %}


Embedding Asciinema

You can also embed an Asciinema video by writing the following:

{% asciinema YOUR_VIDEO_ID %}

You may also choose if the video should be added as an alternate rel tag, so it could later on be played with the `asciinema play https://devdojo/post-name` command, with the rel argument like so:

{% asciinema YOUR_VIDEO_ID rel %}


Embedding Gists

You can also embed a Gists by writing the following:

{% gist GIST_ID_HERE %}


Embedding buymeacoffee.com

You can also embed your "Buy me a coffee" button by writing the following:

{% buymeacoffee BUY_ME_A_COFFEE_USERNAME_HERE %}


Embedding CodeSandbox

You can also embed CodeSandbox by writing the following:

{% codesandbox YOUR_CODESANDBOX_EMBED_URL %}

Example:

{% codesandbox https://codesandbox.io/embed/rough-field-mykn0?fontsize=14&hidenavigation=1&theme=dark %}


That's about it. It's time to start crafting your story.

Please login, or signup to write a response.

Back to DevDojo