Git Product home page Git Product logo

Comments (17)

jasonlewis avatar jasonlewis commented on August 25, 2024

I've been meaning to mention this a few times. There is currently no way to change the public directory even though you can change $app['path'] and $app['path.base']. I'd be all for an implementation of this in some form or another.

from framework.

bencorlett avatar bencorlett commented on August 25, 2024

+100

I've also mentioned this a few times. We just need a $app['path.public'] in the start.php file of your app. Though for this to work the framework needs to reference this, whereas now it's referencing $app['path.base'].'/public'. The same with a vendor path (though this requires a bit more work) [composer lets you choose any vendor path].

from framework.

helmut avatar helmut commented on August 25, 2024

Not sure if I should be the one to have a go at implementing this.

I can add the param to the start.php file but can't think of a clean way of getting that same value for the server.php file. I don't think we want to create another paths.php file like in laravel 3.

Any thoughts on how to implement as cleanly as possible?

from framework.

bencorlett avatar bencorlett commented on August 25, 2024

Hmm you're right there.

I think the only way to do it is have a third file which server.php can reference and start.php can reference :(

from framework.

johnnncodes avatar johnnncodes commented on August 25, 2024

+1000

from framework.

jaumesala avatar jaumesala commented on August 25, 2024

First I thought, this is a must, not all hostings have a "public" folder, so I've checked to see where things start to break (and figure out a patch for it).
Well, I've just done a fresh install and I've changed the public folder name to "www". I've done a simple test and looks everything is working....

I haven't gone deeper with tests but, do I miss something?

from framework.

bencorlett avatar bencorlett commented on August 25, 2024

Grep the whole Laravel folder for 'public'

I'm pretty sure it's there a few times, asset publishing for example.

Also, many third party packages (eg basset) rely on the public folder

Sent from my iPhone
Please excuse my brevity

On 06/02/2013, at 7:16 AM, Jaume [email protected] wrote:

First I thought, this is a must, not all hostings have a "public" folder, so I've checked to see where things start to break (and figure out a patch for it).
Well, I've just done a fresh install and I've changed the public folder name to "www". I've done a simple test and looks everything is working....

I haven't gone deeper with tests but, do I miss something?


Reply to this email directly or view it on GitHub.

from framework.

jaumesala avatar jaumesala commented on August 25, 2024

You're right @bencorlett

grep -r "/public" .

./server.php:$requested = __DIR__.'/public'.$uri;
./server.php:require_once(__DIR__ . '/public/index.php');
./vendor/laravel/framework/src/Illuminate/Foundation/AssetPublisher.php:        $source = $packagePath."/{$package}/public";
./vendor/laravel/framework/src/Illuminate/Foundation/Console/AssetPublishCommand.php:           return $this->laravel['path.base']."/workbench/{$bench}/public";
./vendor/laravel/framework/src/Illuminate/Foundation/Providers/PublisherServiceProvider.php:            $publicPath = $app['path.base'].'/public';
./vendor/laravel/framework/src/Illuminate/Workbench/PackageCreator.php:     $this->files->makeDirectory($directory.'/public');
./vendor/laravel/framework/src/Illuminate/Workbench/PackageCreator.php:     $this->files->put($directory.'/public/.gitkeep', '');

from framework.

helmut avatar helmut commented on August 25, 2024

I guess I'm just waiting on Taylor to make a decision on this? How should we do it?

from framework.

jaumesala avatar jaumesala commented on August 25, 2024

The "$app['path.public']" options sounds good. The problem I see is with already published content. Maybe an Artisan command would be great, it would handle the rename/republish of the public folders from all the packages?

from framework.

arvidbjorkstrom avatar arvidbjorkstrom commented on August 25, 2024

+1
This is really sorely needed.

from framework.

Anahkiasen avatar Anahkiasen commented on August 25, 2024

+1 for this, been needing it a lot of times.

from framework.

bencorlett avatar bencorlett commented on August 25, 2024

I may just put in a pull request in the morning for this. I have an idea of a nice implementation.

Sent from my iPhone
Please excuse my brevity

On 06/02/2013, at 10:25 PM, Maxime Fabre [email protected] wrote:

+1 for this, been needing it a lot of times.


Reply to this email directly or view it on GitHub.

from framework.

arvidbjorkstrom avatar arvidbjorkstrom commented on August 25, 2024

Sweet! =)

from framework.

danielczestki avatar danielczestki commented on August 25, 2024

What about it ? Is it possible to change folder name public to someting else ?

from framework.

crynobone avatar crynobone commented on August 25, 2024

Yes you can @danielczestki, e.g: crynobone/crynobone.com@c55ed05

from framework.

alisalehiman avatar alisalehiman commented on August 25, 2024

good idea

from framework.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.