I am using Eloquent for database calls with slim framework here is my composer.json
{
"require": {
"slim/slim": "3.0",
"illuminate/database": "^6.8",
"monolog/monolog": "^2.0"
}
I want to use Hash::make() which is available in Illuminate\Support\Facades\Hash; but it gives this error
<?php
use Illuminate\Support\Facades\Hash;
require 'vendor/autoload.php';
require 'app.php';
$container = $app->getContainer();
//boot eloquent connection
$capsule = new Capsule;
$capsule->addConnection($container['settings']['db']);
$capsule->setAsGlobal();
$capsule->bootEloquent();
//pass the connection to global container (created in previous article)
$container['db'] = function ($container){
return $capsule;
};
echo Hash::make('wonder');
I tried the composer update but it did not solve it.
how to solve this ? is there any solution for it ?