mardi 9 mai 2017

Laravel 5: add custom library in sub folder of "Libraries" folder

I need to add a custom library to Laravel 5, but I want to add in a sub folder of a "Libraries" folder.
I mean, I have "Libraries" folder inside "app" folder, and I would like to add another folder inside "Libraries" folder and put a class inside it.

What I've done is:

  • Created "Libraries" folder inside "app" folder;
  • Created "FusionChartsWrapper" folder inside "Libraries" folder;
  • Created "FusionCharts.php" file inside "FusionChartsWrapper" folder.

The FusionCharts class has the correct namespace:

namespace App\Libraries\FusionChartsWrapper;

but I can not use it, cause I get this Laravel error:

Class 'App\Libraries\FusionChartsWrapper\FusionCharts' not found

If I move the class inside the "Libraries" folder, it works.
Any idea?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire