When using Laravel or any other modern Framework you will notice many differences with Codeigniter. It "stopped" in time and did not keep up with the news that has come up over the years in the PHP community (Yes, it simply stopped for years).
Currently, for external libraries, the codes are loaded from PHP Autoload , following a pattern of directory structure ( PSR-4 or PSR-0 ) for automatic loading. This is all done by Composer and Laravel already uses it .
To use your old code, you need to modify all of them to eliminate dependencies with Codeigniter, to apply Namespaces to your classes in a way that supports PSR-4.
The directory you can do this can be any one, as long as it is defined in composer.json:
},
"autoload": {
"psr-4": {
"App\": "app/",
"MinhaBiblioteca\": "src/"
}
},
Directory structure
src
|_ Utils
|_ View.php
|_ ScripView.php
To use View.php in any class (including Controllers):
<?php
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use MinhaBiblioteca\Utils\View;
class MeuController extends Controller
{
public function getIndex()
{
$v = new View();
}
}