I am pretty new in Laravel and I have the following problem.
I was working on a Laravel 5 application on my old notebook putting my code on my GIT repository. Then I change laptop and I do the checkout of my Laravel 5 project from GIT.
Then I perform this statment to reimport my dependency:
composer install
Now my problem is that I can't access to the developed section of my Laravel website.
For example I have this controller class:
class RegistrationController extends Controller {
public function index(){
Log::info('index() START');
return view('/registration/index');
}
..................................................................
..................................................................
..................................................................
}
The index() method render the resources/views/registration/index.blade.php view.
The problem is that trying to open the URL http://laravel.dev/registration I obtain the following Laravel error message:
Whoops, looks like something went wrong.
Whoops, looks like something went wrong.
Also if I try to access to the http://laravel.dev/ base URL I am obtaining the same error messages.
where laravel.dev is a virtual host declared in this way into my C:\xampp\apache\conf\extra\httpd-vhosts.conf file:
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs"
ServerName dummy-host2.example.com
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/HotelRegistration/public"
ServerName laravel.dev
</VirtualHost>
Where C:/xampp/htdocs is where all my projects are deployed in Apache and C:/xampp/htdocs/HotelRegistration/public is the public folder of my Laravel 5 project.
Performing the php artisan route:list statment I obtain the list of all my routes:
C:\xampp\htdocs\HotelRegistration>php artisan route:list
+--------+-----------+----------------------------------+----------------------+-----------------------------------------------------+--------------+
| Domain | Method | URI | Name | Action | Middleware |
+--------+-----------+----------------------------------+----------------------+-----------------------------------------------------+--------------+
| | GET|HEAD | / | | Closure | web |
| | GET|HEAD | api/user | | Closure | api,auth:api |
| | GET|HEAD | contact | | Closure | web |
| | POST | contact | | App\Http\Controllers\EnquiryController@index | web |
| | GET|HEAD | registration | registration.index | App\Http\Controllers\RegistrationController@index | web |
| | POST | registration | registration.store | App\Http\Controllers\RegistrationController@store | web |
| | GET|HEAD | registration/create | registration.create | App\Http\Controllers\RegistrationController@create | web |
| | GET|HEAD | registration/{registration} | registration.show | App\Http\Controllers\RegistrationController@show | web |
| | PUT|PATCH | registration/{registration} | registration.update | App\Http\Controllers\RegistrationController@update | web |
| | DELETE | registration/{registration} | registration.destroy | App\Http\Controllers\RegistrationController@destroy | web |
| | GET|HEAD | registration/{registration}/edit | registration.edit | App\Http\Controllers\RegistrationController@edit | web |
+--------+-----------+----------------------------------+----------------------+-----------------------------------------------------+--------------+
that contains:
| | GET|HEAD | registration | registration.index | App\Http\Controllers\RegistrationController@index | web |
So it seems that the registration resource is correctly associated to the previous controller method.
So why am I experiencing this issue? What is the problem? What am I missing? How can I fix this issue?
EDIT-1: going into the laravel.log file I found this error message:
[2017-03-08 09:31:37] production.ERROR: RuntimeException: The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths. in C:\xampp\htdocs\HotelRegistration\vendor\laravel\framework\src\Illuminate\Encryption\Encrypter.php:43
Stack trace:
#0 C:\xampp\htdocs\HotelRegistration\vendor\laravel\framework\src\Illuminate\Encryption\EncryptionServiceProvider.php(27): Illuminate\Encryption\Encrypter->__construct('', 'AES-256-CBC')
#1 C:\xampp\htdocs\HotelRegistration\vendor\laravel\framework\src\Illuminate\Container\Container.php(678): Illuminate\Encryption\EncryptionServiceProvider->Illuminate\Encryption\{closure}(Object(Illuminate\Foundation\Application))
#2 C:\xampp\htdocs\HotelRegistration\vendor\laravel\framework\src\Illuminate\Container\Container.php(565): Illuminate\Container\Container->build(Object(Closure))
#3 C:\xampp\htdocs\HotelRegistration\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(702): Illuminate\Container\Container->make('encrypter')
.............................................................................
.............................................................................
.............................................................................
So the problem could depend by the fact that I have no more my .env file (because it seems that GIT ignore it)?
via blablabla blablabla