I have my laravel application on 1and1 shared hosting its all working but i have a custom class called 'MyFunctions' that is located in
~/project/app/library/MyFunctions.php
I am calling this up in the view and works perfectly fine on local hosting (XAMPP) but when i try to load a page using the class i get this error:
FatalErrorException in 7fe5fab2e881a51735f18c543998448bac15c1d7.php line 22: Class 'project\app\library\MyFunctions' not found
I do not know why??? the code that is throwing the error is:
Hi @jakegroves what Namespace did you use in MyFunctions ? Looking at the location (/app/library/) the namespace should be App\library.
In the blade file you should reference it via the Namespace not the physical location. so it should be something like \App\library\MyFunctions::lessons(...).
@MarkLL okay yer i see that now the namesapce was App\library but it is wierd because it is not picking up the issue on local hosting .... is there a reason why it is doing that?? because I am not going around changing \App\Library... to \App\library... now and its working fine... thanks for that i feel silly just curious if there is a reason why it works on one and not the other.
@MarkLL I understand that now but all my references to that in different views were varying from App\Library\ to App\library\ and they all worked on local hosting, was just curious why it allowed it to work