Rohrig

Rohrig

Member Since 1 Year Ago

Experience Points
19,510
Total
Experience

490 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
185
Lessons
Completed
Best Reply Awards
1
Best Reply
Awards
  • start your engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-in-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

Level 4
19,510 XP
Mar
12
4 months ago
Activity icon

Commented on Programming Katas Explained

This is awesome.

Feb
28
4 months ago
Activity icon

Replied to Use Namespace Confusion

@jlrdw I'm using Php Storm and no syntax errors are being shown. Keep in mind, it does work in one of the two classes

Activity icon

Replied to Use Namespace Confusion

Both classes have corresponding tests. If I Bring in Mage in the constructor it works fine. But the Event classes doesn't require it to work and I'd rather leave out a constructor method if I can

Activity icon

Replied to Use Namespace Confusion

@jlrdw @amaury There were 6 errors:

  1. Tests\Feature\PromoterCrudTest::test_a_list_of_promoters_can_be_shown Symfony\Component\Debug\Exception\FatalThrowableError: Class 'Mage' not found

/var/www/html/api/app/Services/Magento/MageService.php:59 /var/www/html/api/app/Repositories/PromoterRepository.php:37 /var/www/html/api/app/Http/Controllers/PromoterController.php:26 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Controller.php:54 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php:45 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Route.php:219 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Route.php:176 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php:680 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30 /var/www/html/api/vendor/tymon/jwt-auth/src/Http/Middleware/Authenticate.php:32 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php:41 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/app/Http/Middleware/EnforceJson.php:20 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php:58 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:104 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php:682 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php:657 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php:623 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php:612 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:176 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30 /var/www/html/api/vendor/fideloper/proxy/src/TrustProxies.php:57 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php:27 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php:62 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:104 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:151 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:116 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php:375 /var/www/html/api/tests/Traits/AttachJwtToken.php:37 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php:170 /var/www/html/api/tests/Feature/PromoterCrudTest.php:18

  1. Tests\Feature\PromoterCrudTest::test_a_promoter_can_be_shown Symfony\Component\Debug\Exception\FatalThrowableError: Class 'Mage' not found

/var/www/html/api/app/Services/Magento/MageService.php:59 /var/www/html/api/app/Repositories/PromoterRepository.php:21 /var/www/html/api/app/Http/Controllers/PromoterController.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Controller.php:54 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php:45 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Route.php:219 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Route.php:176 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php:680 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30 /var/www/html/api/vendor/tymon/jwt-auth/src/Http/Middleware/Authenticate.php:32 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php:41 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/app/Http/Middleware/EnforceJson.php:20 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php:58 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:104 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php:682 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php:657 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php:623 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php:612 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:176 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30 /var/www/html/api/vendor/fideloper/proxy/src/TrustProxies.php:57 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php:27 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php:62 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:104 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:151 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:116 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php:375 /var/www/html/api/tests/Traits/AttachJwtToken.php:37 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php:170 /var/www/html/api/tests/Feature/PromoterCrudTest.php:41

  1. Tests\Feature\PromoterCrudTest::test_a_nonexistent_promoter_returns_not_found Symfony\Component\Debug\Exception\FatalThrowableError: Class 'Mage' not found

/var/www/html/api/app/Services/Magento/MageService.php:59 /var/www/html/api/app/Repositories/PromoterRepository.php:21 /var/www/html/api/app/Http/Controllers/PromoterController.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Controller.php:54 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php:45 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Route.php:219 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Route.php:176 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php:680 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30 /var/www/html/api/vendor/tymon/jwt-auth/src/Http/Middleware/Authenticate.php:32 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php:41 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/app/Http/Middleware/EnforceJson.php:20 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php:58 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:104 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php:682 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php:657 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php:623 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php:612 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:176 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30 /var/www/html/api/vendor/fideloper/proxy/src/TrustProxies.php:57 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php:27 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php:62 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:104 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:151 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:116 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php:375 /var/www/html/api/tests/Traits/AttachJwtToken.php:37 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php:170 /var/www/html/api/tests/Feature/PromoterCrudTest.php:61

  1. Tests\Feature\PromoterCrudTest::test_a_promoter_can_be_deleted Symfony\Component\Debug\Exception\FatalThrowableError: Class 'Mage' not found

/var/www/html/api/app/Http/Controllers/PromoterController.php:84 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Controller.php:54 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php:45 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Route.php:219 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Route.php:176 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php:680 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30 /var/www/html/api/vendor/spatie/laravel-permission/src/Middlewares/RoleMiddleware.php:25 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/tymon/jwt-auth/src/Http/Middleware/Authenticate.php:32 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php:41 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/app/Http/Middleware/EnforceJson.php:20 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php:58 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:104 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php:682 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php:657 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php:623 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php:612 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:176 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30 /var/www/html/api/vendor/fideloper/proxy/src/TrustProxies.php:57 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php:27 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php:62 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:104 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:151 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:116 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php:375 /var/www/html/api/tests/Traits/AttachJwtToken.php:37 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php:347 /var/www/html/api/tests/Feature/PromoterCrudTest.php:76

5) Tests\Feature\PromoterCrudTest::test_a_promoter_can_be_saved_to_Db Symfony\Component\Debug\Exception\FatalThrowableError: Class 'Mage' not found

/var/www/html/api/app/Services/Magento/MageService.php:59 /var/www/html/api/app/Repositories/PromoterRepository.php:89 /var/www/html/api/app/Http/Controllers/PromoterController.php:38 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Controller.php:54 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php:45 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Route.php:219 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Route.php:176 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php:680 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30 /var/www/html/api/vendor/spatie/laravel-permission/src/Middlewares/RoleMiddleware.php:25 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/tymon/jwt-auth/src/Http/Middleware/Authenticate.php:32 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php:41 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/app/Http/Middleware/EnforceJson.php:20 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php:58 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:104 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php:682 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php:657 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php:623 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php:612 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:176 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30 /var/www/html/api/vendor/fideloper/proxy/src/TrustProxies.php:57 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php:27 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php:62 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:104 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:151 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:116 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php:375 /var/www/html/api/tests/Traits/AttachJwtToken.php:37 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php:347 /var/www/html/api/tests/Feature/PromoterCrudTest.php:125

  1. Tests\Feature\PromoterCrudTest::test_a_promoter_can_be_updated Symfony\Component\Debug\Exception\FatalThrowableError: Class 'Mage' not found

/var/www/html/api/app/Services/Magento/MageService.php:59 /var/www/html/api/app/Repositories/PromoterRepository.php:130 /var/www/html/api/app/Http/Controllers/PromoterController.php:70 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Controller.php:54 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php:45 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Route.php:219 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Route.php:176 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php:680 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30 /var/www/html/api/vendor/spatie/laravel-permission/src/Middlewares/RoleMiddleware.php:25 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/tymon/jwt-auth/src/Http/Middleware/Authenticate.php:32 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php:41 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/app/Http/Middleware/EnforceJson.php:20 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php:58 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:104 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php:682 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php:657 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php:623 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Router.php:612 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:176 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:30 /var/www/html/api/vendor/fideloper/proxy/src/TrustProxies.php:57 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php:27 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php:62 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:163 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php:53 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:104 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:151 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:116 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php:375 /var/www/html/api/tests/Traits/AttachJwtToken.php:37 /var/www/html/api/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php:347 /var/www/html/api/tests/Feature/PromoterCrudTest.php:173

Activity icon

Started a new Conversation Use Namespace Confusion

What could be a reason one class says Mage not found and the other works correctly?

<?php

namespace App\Repositories;

use App\Models\EventLocation;
use App\Models\Magento\CategoryInt;
use App\Models\Magento\Event;
use App\Models\EventDates;
use App\Services\Magento\MageService;
use Illuminate\Http\Request;
use Exception;

class EventRepository
{
    const  ATTRIBUTE_ID_FOR_EVENT_ID = 414;
    const  ATTRIBUTE_ID_PRODUCT_ID = 438;

    public function model()
    {
        MageService::getModel("fw_cvents/promoter")->load($id)->getData();
    }

<?php

namespace App\Repositories;

use App\Models\Magento\Promoter;
use App\Services\Magento\MageService;
use Illuminate\Http\Request;
use Exception;


class PromoterRepository
{

    public function model()
    {
        MageService::getModel("fw_cvents/promoter")->load($id)->getData();
    }

Where Mage is brought in. . .

namespace App\Services\Magento;

use Mage;
use Mage_Core_Model_App;

class MageService
{

    public function __construct()
    {
        $path = '/var/www/html/magento/app/Mage.php';
        require_once $path;
        Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
    }

To be clear: It works in one class but not the other. That is the confusing part.

Feb
09
5 months ago
Activity icon

Awarded Best Reply on What's A Good Way To Learn User Roles And Permissions In Laravel?

I think by far the package from Spatie is the most widely used in the Laravel community.

https://docs.spatie.be/laravel-permission/v3/basic-usage/basic-usage/#

You can of course use the package if you want an easy way to implement Roles and Permissions.

Also, if you're mainly focused on learning, I know of no better substitute than looking through well written, well organized , well documented code, which that package offers.

Feb
08
5 months ago
Activity icon

Replied to How To Move Laravel User Model Inside App\Models Namespace?

Any Idea what else might cause this move not to work?

I've done all of the above yet I'm still getting Null when checking a user I know exists.

Also I've move the User model back and forth just to be sure and it only throws an error when not in the original namespace.

I successfully move every other model in my app except the user model. Any tips would be appreciated

Activity icon

Replied to Moving Files (in Bulk) In Phpstorm Not Adjusting Namespace

That's precisely my problem. Using this method isn't working. The reason, I believe ,has something to do with the directory settings. But I'm not sure how to correctly adjust them.

Activity icon

Replied to Moving Files (in Bulk) In Phpstorm Not Adjusting Namespace

Thanks @tisuchi. But I need to move files in bulk. This method is great for one file, but I have to move many files. I'll try to add the word bulk to the question so it's more clear.

Activity icon

Replied to What's A Good Way To Learn User Roles And Permissions In Laravel?

I think by far the package from Spatie is the most widely used in the Laravel community.

https://docs.spatie.be/laravel-permission/v3/basic-usage/basic-usage/#

You can of course use the package if you want an easy way to implement Roles and Permissions.

Also, if you're mainly focused on learning, I know of no better substitute than looking through well written, well organized , well documented code, which that package offers.

Activity icon

Started a new Conversation Moving Files (in Bulk) In Phpstorm Not Adjusting Namespace

I'm using Phpstorm with Laravel and when I move a file using Refactor->Move (F6) the Namespace doesn't update. I have seen you can adjust the directories under the settings but I can't seem to find the right setting. Can anyone list their settings or give an explanation of how it works?