LaravelRUS /
SleepingOwlAdmin
| 1 | <?php |
||
| 2 | |||
| 3 | namespace SleepingOwl\Admin\Widgets\Messages; |
||
| 4 | |||
| 5 | use AdminTemplate; |
||
|
0 ignored issues
–
show
|
|||
| 6 | use SleepingOwl\Admin\Widgets\Widget; |
||
| 7 | |||
| 8 | abstract class Messages extends Widget |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var string |
||
| 12 | */ |
||
| 13 | protected static $sessionName; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var string |
||
| 17 | */ |
||
| 18 | protected $messageView; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Get content as a string of HTML. |
||
| 22 | * |
||
| 23 | * @return string |
||
| 24 | */ |
||
| 25 | public function toHtml() |
||
| 26 | { |
||
| 27 | return AdminTemplate::view($this->messageView, [ |
||
| 28 | 'messages' => $this->getMessage(), |
||
| 29 | ])->render(); |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @return string|array |
||
| 34 | */ |
||
| 35 | 285 | public function template() |
|
| 36 | { |
||
| 37 | 285 | return AdminTemplate::getViewPath('_layout.inner'); |
|
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @return string |
||
| 42 | */ |
||
| 43 | public function block() |
||
| 44 | { |
||
| 45 | return 'content.top'; |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @return string |
||
| 50 | */ |
||
| 51 | public function getMessageView() |
||
| 52 | { |
||
| 53 | return $this->messageView; |
||
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @param string $messageView |
||
| 58 | */ |
||
| 59 | public function setMessageView($messageView) |
||
| 60 | { |
||
| 61 | $this->messageView = $messageView; |
||
| 62 | } |
||
| 63 | |||
| 64 | /** |
||
| 65 | * @return mixed |
||
| 66 | */ |
||
| 67 | protected function getMessage() |
||
| 68 | { |
||
| 69 | return session(static::$sessionName); |
||
| 70 | } |
||
| 71 | |||
| 72 | /** |
||
| 73 | * @param string $text |
||
| 74 | * @return mixed |
||
| 75 | */ |
||
| 76 | public static function addMessage($text) |
||
| 77 | { |
||
| 78 | return session()->flash(static::$sessionName, $text); |
||
| 79 | } |
||
| 80 | } |
||
| 81 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths