I am working with Laravel5.4. When I use socialite package to login with Facebook, I need to add this line of
Schema::defaultStringLength(191);
to boot function of AppServiceProvider
class in order to create default password for new user.
Beside that I have to add using statement at top of AppServiceProvider
class like this
use Illuminate\Support\facades\Schema;
Everything is working well on my localhost but when I upload all code to my share hosting, I get this error
Class 'Illuminate\Support\facades\Schema' not found.
Can anyone help me on this. I am highly appreciated your help!
OMG I follow the marked answer of question below and replace the using statement with use Schema; and the error gone. But I still don't know why it works well on local and only cause error on server.
Method 'create' not found in class Illuminate\Support\Facades\Schema
Maybe you need to change use Illuminate\Support\facades\Schema;
to
use Illuminate\Support\Facades\Schema;
Facades needs to capital F
You must set the .env file This setting
in app/Providers/AppServiceProvider.php
n
Fix Capitalize Error and replace:
with
The reason it might work on local and not work on server is that probably you're using windows locally, and Linux hosting account which is case-sensitive regarding the paths and filenames
Replace this line:
With this:
I was facing the same error when i hosted website .
Class 'Illuminate\Support\facades\Schema' not found.
then i just replaced use Illuminate\Support\facades\schema; with use Illuminate\Support\Facades\Schema;