My question relates to integrating CometChat with laravel 5.1.
I'm trying to give access to Laravel within the integration.php file of Cometchat. I want to give access to the Session class so I can access the session info from the database (by default Cometchat uses file sessions). For the moment I have switched Laravel to use file sessions.
So how can I get access to sessions from Laravel so I can access it within the integration.php file?
Ok I think I have worked it out. The following code gives me access to the existing Laravel app and I am able to access Session and even Sentinel.
I also added an include that points to vendor/autoload.php, which has now given me access to the QueryBuilder and other systems.
At the top of integration.php I have:
This returns the current running Laravel, and I am then able to do something like
$app['session']->get('dataname')
Though with the added vendor/autoload.php I can now also access
DB::table
orSentinel::getUser()
, etc