I'm new on Laravel and need some help. Actually I use 5.3 Laravel version. I need to use, in Laravel, external company framework (call it F for simplicity). This framework is some like process manager. Actually, for integrate it with laravel I put it in laravel/public folder, this way I can use laravel and F's pages in same domain. In laravel I need to access to some F functionality which is all collect in class FFramework\Facade\FInterface; Then I want to access to this class from laravel controller FController. But when I run code I get Class Not Found Exception.
FController.php
<?php
namespace App\Http\Controllers;
use FFramework\facade\FInterface;
class FController extends Controller {
public function getSimpleDAta() {
$f = new FInterface();
return $f->getSimpleData();
}
}
FInterface.php
<?php
namespace FFramework\facade;
use some\internal\function;
class FInterface {
public function getSimpleDAta() {
$simpleData = ...omg so much computation :) ...
return $simpleData;
}
}
Class 'FFramework\facade\FInterface' not found
I use standard LAMP configuration PHP version is last 5.6 stable version
How can I use FInterface from Laravel controller leaving FFramework in public folder?
You need to update the autoload section of your composer.json
file to tell your project where to look for files in the FFramework
namespace.
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
"FFramework\\": "public/fframework"
}
},