Support the ongoing development of Laravel.io →

classe Application

7 Apr, 2020 1 min read

laravel/app/Application.php

<?php

namespace App;

class Application extends \Illuminate\Foundation\Application {
    public function publicPath() {
        return realpath($this->basePath.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'public_html');
    }
}

e modificare laravel/bootstrap/app.php

da 

$app = new Illuminate\Foundation\Application(
    $_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)
);

a

/*
$app = new Illuminate\Foundation\Application(
    $_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)
);
*/
$app = new App\Application(
    //realpath(__DIR__.'/../')
    dirname(__DIR__)
);

 

401
Like this article? Let the author know and give them a clap!

Other articles you might like

modulo contatti

in laravel&nbsp; &lt;!DOCTYPE html&gt; &lt;html lang="{{ str_replace('_', '-', app()-&gt;getLocale...

Read article

create view

in laravel @extends('layout') @section('content') &lt;style&gt; .container { max-widt...

Read article

controller in laravel vs controller in laraxot

in laravel &lt;?php namespace App\Http\Controllers; use App\Student; use Illuminate\Http\Request...

Read article

We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2022 Laravel.io - All rights reserved.