Laravel on IIS

php and getcomposer

composer global require "laravel/installer"

cd \Websites\Development\2018

laravel new project-website-name

cd project-website-name

php artisan serve (ctrl-C to exit)

– OR –

add C:\Websites\Development\2018\project-website-name\public
run with php 7.(1.12?)
CHANGE rights WITH Properties-Security-EDIT-Users-MODIFY
ON /storage AND /bootstrap/cache

PHP >= 7.0.0
OpenSSL PHP Extension
PDO PHP Extension
Mbstring PHP Extension
Tokenizer PHP Extension
XML PHP Extension

Check php.ini
extension=php_exif.dll ; Must be after mbstring as it depends on it

AND ADD TO /public/web.config
<rule name=”Rule 1″ stopProcessing=”true”>
<match url=”^(.*)/$” ignoreCase=”false” />
<action type=”Redirect” redirectType=”Permanent” url=”/{R:1}” />
<rule name=”Rule 2″ stopProcessing=”true”>
<match url=”^” ignoreCase=”false” />
<add input=”{REQUEST_FILENAME}” matchType=”IsDirectory” ignoreCase=”false” negate=”true” />
<add input=”{REQUEST_FILENAME}” matchType=”IsFile” ignoreCase=”false” negate=”true” />
<action type=”Rewrite” url=”index.php” />

NEXT you create a database and add some basic tables with

php artisan migrate
and you might run into the next problem…

Laravel 5.4: Specified key was too long error

Laravel 5.4 made a change to the default database character set, and it’s now utf8mb4 which includes support for storing emojis. This only affects new applications and as long as you are running MySQL v5.7.7 and higher you do not need to do anything.

For those running MariaDB or older versions of MySQL you may hit this error when trying to run migrations:

SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table users add unique users_email_unique(email))

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

As outlined in the Migrations guide to fix this all you have to do is edit your AppServiceProvider.php file and inside the boot method set a default string length:

use Illuminate\Support\Facades\Schema;

public function boot()

After that everything should work as normal.


this also can solve it:

in config/databa se.php in mysql section

       'charset' => 'utf8mb4',
       'collation' => 'utf8mb4_unicode_ci',

replace with

       'charset' => 'utf8',
       'collation' => 'utf8_unicode_ci',

this will allow user email to be longer then 191 characters log but will not support some charactes: