master

laravel/framework

Last updated at: 29/12/2023 09:20

view.php

TLDR

This file is a configuration file for the Laravel framework's view storage paths and compiled view path.

Constants

paths

This constant specifies the array of paths that should be checked for views. By default, the Laravel view path is already registered for you.

compiled

This constant determines where all the compiled Blade templates will be stored for your application. By default, it is set to the storage/framework/views directory.

<?php

return [

    /*
    |--------------------------------------------------------------------------
    | View Storage Paths
    |--------------------------------------------------------------------------
    |
    | Most templating systems load templates from disk. Here you may specify
    | an array of paths that should be checked for your views. Of course
    | the usual Laravel view path has already been registered for you.
    |
    */

    'paths' => [
        resource_path('views'),
    ],

    /*
    |--------------------------------------------------------------------------
    | Compiled View Path
    |--------------------------------------------------------------------------
    |
    | This option determines where all the compiled Blade templates will be
    | stored for your application. Typically, this is within the storage
    | directory. However, as usual, you are free to change this value.
    |
    */

    'compiled' => env(
        'VIEW_COMPILED_PATH',
        realpath(storage_path('framework/views'))
    ),

];