Configuration
config/app.php
Make sure to change the time zone:
'timezone' => 'America/Los_Angeles',
.env
For local development, enter your database credentials:
DB_CONNECTION=mysqlDB_HOST=127.0.0.1DB_PORT=3306DB_DATABASE=databasenameDB_USERNAME=databaseuserDB_PASSWORD=password
To use MailTrap.io for sending emails to a test email Inbox, get a MailTrap account, then add this info to .env:
MAIL_DRIVER=smtpMAIL_HOST=mailtrap.ioMAIL_PORT=2525MAIL_USERNAME=mailtrapusernameMAIL_PASSWORD=mailtrappasswordMAIL_ENCRYPTION=null
To use MailGun for sending emails to real Inboxes, get a Mailgun account, then add this info to .env:
MAIL_DRIVER=smtpMAIL_HOST=smtp.mailgun.orgMAIL_PORT=2525MAIL_USERNAME=mailgunusernameMAIL_PASSWORD=mailgunpasswordMAIL_ENCRYPTION=nullMAILGUN_DOMAIN=mg.domain.tldMAILGUN_SECRET=mailgunsecretkey
To set a default "FROM" email address for all outbound emails, add these lines:
MAIL_FROM_ADDRESS=valid-email@domain.tldMAIL_FROM_NAME='Display Name'
NOTE: Some email systems will reject or bounce your emails if you don't use a valid "FROM" email address.
AppServiceProvider
If you're using MySQL < 5.7.7, avoid getting "Specified key was too long" errors by adding this at the top:
use Illuminate\Support\Facades\Schema;
Then add this to the boot() method:
Schema::defaultStringLength(191);