Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

DataGrid:buildCSV, should file be saved under storage folder instead of public? #434

Open
sroutier opened this issue May 10, 2018 · 0 comments

Comments

@sroutier
Copy link
Contributor

The section of code in DataGrid:buildCSV() save the given file under the public folder:

        if ($save) {
            $handle = fopen(public_path().'/'.dirname($file)."/".$filename, 'w');
        } else {

according to the official Laravel directory structure at https://laravel.com/docs/5.6/structure, the role of the public and storage directory are:

The Public Directory
The public directory contains the index.php file, which is the entry point for all requests entering your application and configures autoloading. This directory also houses your assets such as images, JavaScript, and CSS.

The Storage Directory
The storage directory contains your compiled Blade templates, file based sessions, file caches, and other files generated by the framework. This directory is segregated into app, framework, and logs directories. The app directory may be used to store any files generated by your application. The framework directory is used to store framework generated files and caches. Finally, the logs directory contains your application's log files.

sroutier added a commit to sroutier/rapyd-laravel that referenced this issue May 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant