-2

I updated my composer then I am trying to run my project I can't !!

when I write

 php artisan serve 

I get this error

 Symfony\Component\Debug\Exception\FatalErrorException  : Class Carbon\Carbon contains 4 abstract methods and must therefore be declared abstract or implement the remaining methods (Carbon\CarbonInterface::__clone, Carbon\CarbonInterface::getLocalMacro, Carbon\CarbonInterface::getMacro, ...)

at /Users/macbook/Desktop/egydiet/vendor/nesbot/carbon/src/Carbon/Carbon.php:509

  • 1
    Please edit the question to: 1) write a title that actually describes the problem, 2) add the commands and error messages as text, not an image and 3) give us a bit more information about what you're trying to do. There's some quality guidance [here](https://stackoverflow.com/help/how-to-ask). – El_Vanja Mar 22 '20 at 10:10
  • I have added a down vote as absolutely no clear information was given, a bit of a thumb-suck. After viewing your link however, change your "class MyClassName" to "abstract class MyClassName". – AlwaysConfused Mar 22 '20 at 10:14
  • @El_Vanja I am sorry , I updated my question – Andrew Nady Mar 22 '20 at 10:18
  • Thank you, I have up voted again. Answer can be found here - https://stackoverflow.com/questions/2371490/how-to-declare-abstract-method-in-non-abstract-class-in-php – AlwaysConfused Mar 22 '20 at 10:31

1 Answers1

0

I am linking to a solution found Fix: Class abstract methods.

When a class contains one or more abstract functions / methods, you must either: Declare the class as an abstract class or Implement the methods in the class that is extending your abstract class. To fix the issue, we can make one simple change. Instead of writing:

<?php
class YourClassName{

you can write -

<?php
abstract class YourClassName{

PHP documentation covers this in detail HERE.

Alternatively some good explanations and answers was provided in Stackoverflow HERE.

AlwaysConfused
  • 450
  • 4
  • 13