In laravel5.6 couldn't migrate - laravel-5.6

NB: I using the php7.2 version in Elementary os
Error Screenshot

Have you set your .env variables:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=
DB_USERNAME=
DB_PASSWORD=
Is MySQL and php-mysql installed and running?

Related

How do I set up MySql workbench to be used with laravel?

I'm really new to using Ubuntu. During university we used MySql Workbench as our way of interacting with the databases we would seed in Laravel and I'm looking recreate this on my own PC. How do I go about installing and configuring workbench to be used with my Laravel projects? I had it (workbench) installed but it doesn't seem to 'connect' to Laravel. Apologies if that doesn't really make sense but I'm new to a lot of this and it's a little intimidating.
Do i need to install SQL on it's own then configure workbench to work with it? Thanks for any help
For installation of MySQL it should be as simple as sudo apt-get upgrade, sudo apt-get install mysql-server.
To use the DB in your laravel project you just need to specify it's settings in your .env file (DB_HOST would be 127.0.0.1 if your DB is local, and then DB_USERNAME and DB_PASSWORD).
Install MySQL Workbench on Ubuntu:
sudo apt-get update
sudo apt-get install mysql-workbench
Update your env settings and see below how to set connection in workbench:
DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=DBNAME
DB_USERNAME=root
DB_PASSWORD=secret

Laravel - Error page is blank after update from 5.3 to 5.4

I have updated Laravel from 5.3 to 5.4. Error pages are white and do not display an error after update. I am using a local server. The specifications:
OS: Ubuntu 16.04
Nginx/1.9.15
PHP 5.6.11
I read the this question (Laravel blank white screen) and I have tried solutions:
# Group Writable (Group, User Writable)
$ sudo chmod -R gu+w storage
# World-writable (Group, User, Other Writable)
$ sudo chmod -R guo+w storage
And other solutions have been proposed. But the problem persists!
Also, Application debuggin in .env and config/app.php is true.
Who can help?
After update your laravel you may clear all your cache and your compiled page. Try to do this:
php artisan view:clear
php artisan cache:clear
php artisan config:clear
php artisan route:clear
php artisan clear-compiled
php artisan optimize

Reload .env constants in Laravel 5.2

I just changed a constant inside my .env file. The new value is shown up correctly with php-cli (via tinker), but not in my web app (php-fpm).
So far I've tried everything as suggested:
sudo service nginx restart
sudo service php7.0-fpm restart
sudo service php7.0-fpm reload
.
php artisan config:cache
This will generate a cache config file in bootstrap/cache/config.php
php artisan config:clear
This will remove cache config file in bootstrap/cache/config.php
php artisan cache:clear
What exactly does does ? What type of cache does it clear?
php artisan clear-compiled
This clear compile classes
composer dump-autoload
This will generate/update composer autoload file.
I have some .env variables that are not part of any config file. So it is useless for me to run any of the artisan commands.
None of the above php artisan commands don't deal directly with $_ENV.
Seems that $_ENV is stored somewhere in the server and laravel cannot update it once properties are populated.
The only solution I've found is restarting the server.
I'm running a Laravel Forge instance.
If it is cached and you need to reload it you can simply use:
php artisan config:clear
This will pull in any changes that you have since made.
Try to delete the config on file on: Bootstrap/cache/config.php
AS well you can try: php artisan config:cache or php artisan cache:clear

laravel install getting key generate error in ubunto OS

I am install "Laravel Framework version 5.2.26" but i am getting error for key generate in my ubuntu os
user#CN43:/var/www/html/laravel_1$ php artisan key:generate
[ErrorException]
file_get_contents(/var/www/html/laravel_1/.env): failed to open stream: No
such file or directory
So i have check that directory .env file is not there but .env.example file only there so i created that file and update database name, database username, database password after that "php artisan key:generate" command is worked that key was generated above 32 characters and its get [base64:somethingsstrings with above 32 characters] i think some installation issues is there.
my laravel site is not opening. what i do mistake?
Rename .env.example to .env and fill all properties.
If you install Laravel via Composer, this file will automatically be
renamed to .env. Otherwise, you should rename the file manually
https://laravel.com/docs/5.0/configuration#environment-configuration
Run this command and make .env file from .env.example file:
cp .env.example .env
php artisan key:generate
Now it's generate the key. Don't create new .env file.

Install with php 5.5.16 laravel

I try to install Laravel 4.2, i have ubuntu 14.04 and php 5.5.16 with apache2.4.10. The install works..., but i have a message with composer install:
Script php artisan optimize handling the post-install-cmd event returned with an error
When i change a permission to storage (chmod 777 -R app/storage) directory and i put debug at true into config file app.php, the command php artisan optimize works whell.
Do you think, i have something wrong with my PHP configuration or permission directory ?
Tony, thank
Most likely its permissions. Check to make sure your www-data has the right permissions

Resources