1

I'm trying to use Cartalyst Sentinel for my scripts. I've downloaded the files from github. (https://github.com/cartalyst/sentinel). I've put it on my wamp, and I am trying to follow the instructions here (https://cartalyst.com/manual/sentinel/2.0#native).

This is what I have so far:

<?php

// Import the Sentinel Classes

use sentinel\src\Native\Facades\Sentinel;
use Illuminate\Database\Capsule\Manager as Capsule;

require 'vendor/autoload.php';

$capsule = new Capsule;

$capsule->addConnection([
    'driver' => 'mysql',
    'host' => 'localhost',
    'database' => 'sentinel',
    'username' => '',
    'password' => 'secret',
    'charset' => 'utf8',
    'collation' => 'utf8_unicode_ci',
]);


$capsule->bootEloquent();

?> code here

I've followed the instructions but I have changed the directory from the first use... I cannot seem to find vendor/autoload.php. I get the cannot find stream error.

and when I remove that, I get this error.

( ! ) Fatal error: Class 'Illuminate\Database\Capsule\Manager' not found in C:\wamp\www\lab\login.php on line 10

So I'm kind of confused since the manual isn't really providing ways to solve problems and what we need.

Any help would be greatly appreciated!

davejagoda
  • 2,420
  • 1
  • 20
  • 27
JP Foster
  • 1,725
  • 4
  • 17
  • 23

1 Answers1

0

It seems you have not updated later with the implementation for the Illuminate Database component.

To use it run:

composer require illuminate/database illuminate/events symfony/http-foundation 

This will install Illuminate\Database\Capsule hope this works.

I am 4 years late to answer this but believe that this might help someone struggling.

Chandraarnav
  • 77
  • 1
  • 10