ISSUE: Attempting to freshly install Laravel 5 and convert my Laravel 4 code to Laravel 5.
REQUEST: Please help me find the error and provide detailed instructions on how to correct it.
ERROR: FatalThrowableError in IndexController.php line 21: Fatal error: Class 'App\Library\AdditionalPCs' not found
Notes: I have put the additionalPCs.php file in both its own directory App\Libary\additionalPCs and directly into the App directory. Both places produce the same error.
Composer.json
"autoload": {
"classmap": [
"database",
"app/Library"
],
"psr-4": {
"App\\": "app/"
}
},
IndexController.php
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Library\AdditionalPCs;
use App\Http\Requests;
use App\Http\Controllers\Controller;
class IndexController extends Controller
{
Protected $layout = 'master';
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
/** */
$numberofpcs = new additionalPCs();
$addtpcs=$numberofpcs->display();
$this->layout->content = View::make('index')->with('addtpcs', $addtpcs)->with('businesstypelist', businesstype::dropdown())->with('contracttermlist',ContractTerm::dropdown());
}
}
additionalPCs.php
<?php
namespace App\Library\AdditionalPCs;
class additionalPCs extends additionalComputer {
public function display() {
return $this->displayMenu();
}
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire