0

why does View::make() not exist in laravel docs? I have gone through on xVersion/views pages of all versions of Laravel docs, but I couldn't find any statement about View::make(). who can explain to me how it works?

additional info, I'm learning Aimeos Laravel package. I don't think View::make is from Aimeos packages. because, I see enter image description here

composer.json

> "require": {
>         "php": "^7.2.5",
>         "aimeos/aimeos-laravel": "dev-master",
>         "fideloper/proxy": "^4.2",
>         "fruitcake/laravel-cors": "^2.0",
>         "guzzlehttp/guzzle": "^6.3",
>         "laravel/framework": "^7.24",
>         "laravel/tinker": "^2.0",
>         "laravel/ui": "^2.4"
>     },
Murod
  • 22
  • 1
  • 6

2 Answers2

2

Many things in Laravel have multiple ways of referencing them.

The documentation prefers the use of the cleaner, less verbose view() helper, but you can use View::make if you prefer.

The API docs for View::make are at https://laravel.com/api/8.x/Illuminate/Contracts/View/Factory.html#method_make.

ceejayoz
  • 176,543
  • 40
  • 303
  • 368
2

View::make is calling a make method on the View facade. This was how views were referenced in Laravel 4.x, but Laravel 5.x introduced the global view helper that does the same thing, just with a few less keystrokes.

Therefore, View::make('shop::page.privacy') is the same as view('shop::page.privacy').

Martin Bean
  • 38,379
  • 25
  • 128
  • 201