elic-dev/laravel-site-protection

Error when publishing views

Closed this issue · 4 comments

Hi there

When running:

php artisan vendor:publish --provider="ElicDev\SiteProtection\SiteProtectionServiceProvider" --tag=views

I get:

PHP Fatal error: Class ElicDev\SiteProtection\SiteProtectionServiceProvider contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Illuminate\Support\ServiceProvider::register) in /home/vagrant/Code/comduit.test/vendor/elic-dev/laravel-site-protection/src/SiteProtectionServiceProvider.php on line 22

and also this message:

[Symfony\Component\Debug\Exception\FatalErrorException]
Class ElicDev\SiteProtection\SiteProtectionServiceProvider contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Illuminate\Support\ServiceProvider::register)

Is there something I need to update on my side perhaps?

L1lle commented

Hi, thanks for the issue.
I guess this is related to some updates on Laravel Framework (5.4 or 5.3). I'll check it today and publish an update for newer Laravel versions. It runs fine with Laravel 5.6. What version do you use?

Until just copy manually the src/views/site-protection-form.blade.php to resources/vendor/site-protection/site-protection-form.blade.php

L1lle commented

Hi @mhluzi

This package requires now at least a Laravel Framework of version 5.2. I've added a note to the README and updated the ServiceProvider class.

If you're using 5.2 you can just update the package using composer. If you're using 5.0 or 5.1 I might not have good news. There won't be a support for those versions at the moment.

Did this help you?

L1lle commented

closing because of inactivity.

Thanks! Apologies for the delay in response - all sorted now.

I appreciate the support!