Comments (17)
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.
+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.
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.
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.
+1000
from framework.
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.
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.
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.
I guess I'm just waiting on Taylor to make a decision on this? How should we do it?
from framework.
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.
+1
This is really sorely needed.
from framework.
+1 for this, been needing it a lot of times.
from framework.
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.
Sweet! =)
from framework.
What about it ? Is it possible to change folder name public to someting else ?
from framework.
Yes you can @danielczestki, e.g: crynobone/crynobone.com@c55ed05
from framework.
good idea
from framework.
Related Issues (20)
- Migration is not working as expected (as written in docs) HOT 5
- Potential infinite recursion when executing `schema:dump` HOT 2
- Potential infinite recursion when executing `schema:dump` HOT 11
- Custom validation rules break generated error MessageBag when custom messages are defined HOT 2
- limit() in relationship load extremely slow in Laravel 11 HOT 2
- Listeners are handled within transactions despite the ShouldHandleEventsAfterCommit interface
- Laravel 11 auto session=database throws intermittent SQLSTATE[08004] [1040] Too many connections error HOT 5
- DatabaseRule "unique" fails quietly when given an incorrect column HOT 4
- Where Query with Arrays for JSON Columns HOT 7
- Adding a batch to a chain through prependToChain/appendToChain results in serialization errors HOT 2
- Cannot override default error page with Laravel 11 Bootstrap Exception Handling HOT 2
- firstOrNew on belongsToMany doesn't work as expected HOT 3
- Accessor date casting formatting as UTC when being serialized to JSON. HOT 1
- Contextual binding resolved when it shouldn't be for LogManager HOT 1
- Using Emergency logging channel throw an exception HOT 3
- Sqlite column processing crashes when column has a "/" in its name
- Database migrations in pretend mode doesn't display insert statements to migrations table HOT 3
- Job runs longer than "retry_after" will re-run immediately once the "retry after" seconds passed. HOT 1
- Unexpected behaviour when chunking a query HOT 3
- Artisan db:show and db:table fails when database has tables in multiple schemas HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from framework.