PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, February 12, 2022

[FIXED] Where exactly is this view being loaded from?

 February 12, 2022     laravel     No comments   

Issue

@if (view()->exists('payment::' . $paymentMethod->name))

@endif

I came across this condition in a blade file and I can't figure out what the payment:: section means. Where would I look for the actual blade file in my folder structure?


Solution

While creating the package you can also provide the blade views along with your package. In the package service provider under boot method you can call loadViewsFrom method.

So the package you are using must have registered under the payment namespace.

$this->loadViewsFrom(__DIR__.'/pathtoview', 'payment');

Here is some of the links to the package that provided views out of the box

  1. rap2hpoutre/laravel-log-viewer is registered under laravel-log-viewer namespace
  2. aschmelyun/larametrics is registered under larametrics namespace


Answered By - ManojKiran Appathurai
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing