CodeAnywhere Laravel Php Container Setup

I use for a long time CodeAnywhere to develop my application via FTP, or to use shell server console via SSH.
Now i want to use the Container and try to create a Laravel PHP application.
But i have encountered some errors that i want to report you.

Now start with the creation of the container, with the “Connection Wizard” is very simple:

If we want to run the Laravel php application, we must to use this command, and set the ip to use app from remote container url.

[cabox@PHPBOX app]$ php artisan serve --host= --port=8000
Laravel development server started:

Some possible error

SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes

Edit your app/providers/AppServiceProvider.php file and inside the boot method set a default string length:

use Illuminate\Support\Facades\Schema;

public function boot()

SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘users’ already exists

Solution is to run con shell

[cabox@PHPBOX app]$ php artisan migrate:fresh
[cabox@PHPBOX app]$ php artisan migrate


"Javascript is to Java as hamburger is to ham; both are delicious, but they don't have much in common except a name" I'm javascript lovers and this is my site on witch sometimes write about my experience, when i have some free time, and remember: "Homo faber fortunae suae"

Write a Comment

Your email address will not be published.