flimp's avatar

Artisan Tinker output looks different to video

Hi All,

I've quite new to programming and have been following the laracasts tutorial. I've reached a point where the video started using Artisan Tinker and I was wondering why the output in the video looks very different to the one in my console?

Is this due to the console emulator I'm using? I'm using ConEmu in PowerShell Admin mode and am using MySQL instead of SQLite.

Also, is there a way to work directly with MySQL in php artisan? The video shows you can work directly with the SQLite database via Tinker so I was wondering if it was possible to do the same?

Thanks :)

0 likes
8 replies
Mbezdek's avatar

Hi,

If you mean that the colours are different, it could be set in your console option. If you mean that the text is different, it's because on video is used older PHP version. You probably using PHP 5.6 where is novelty of writing arrays :) But you don't have to be afraid, it's doing some things :)

Martin

flimp's avatar

Hi,

Thank you for your reply. I was more talking about the text. e.g. the video has numbers on each line and the output looks different too but if it's simply due to a newer version of PHP then that's fine.

Also, is there a way to directly work with MySQL via Tinker?

fabianlaule's avatar
Level 2

@flimp I think you have a newer version of the PsyShell, so don't worry. If it detects numbers, it won't put it in quotation marks ;)

fabianlaule's avatar

@flimp You can use all PHP functions you need. If you don't want user Eloquent or the Database functionality from Laravel, you can connect to your DBMS with the php extension mysqli.

Snapey's avatar

Your code shows that you are working with the database, you just did a query and showed the result.

If your screenshot is using sqllite then just change your database drivers in .env file

Francismori7's avatar

The Laracasts video uses an older version of Laravel, and thus an older version of Psy Shell, that's why.

Your console looks just like mine.

flimp's avatar

Oops - forgot to thank you guys for your help. Much appreciated :)

Please or to participate in this conversation.