Is there a way to download file without prompt in php/Laravel - php

I am Working on laravel Project i have excel file which i want to download without showing popup of where to save file.

Using Storage::download(), you can start the download instantly.
return Storage::download($path)
Related section in Laravel docs.

Related

Updating composer library after files deployed to shared production server

I created a website using laravel.
I uploaded the site to my shared server, and site was running fine.
After that I had to add a library called Intervention. In local, I used this command and everything is working fine.
php composer.phar require intervention/image
I made changes in files and everything is working fine in local.
Now, I need to upload the updated files. So rather than deleting whole online folder, and re-uploading, I just want to upload changed files (I know the controller, view files that were changed).
But, as it is a shared server there is no way or place to execute composer update command or get that one library (thus now I am getting intervention Image class not found error).
So, what would be ideal thing to do in this case?
The easiest one maybe delete the whole folder and upload it again but the files are almost 500mb so do not want that.
Any suggestions to handle this situation? (updating composer libraries after deployment)
Not really a php or laravel question, but if you're using ftp to upload there's usually an option to only upload changed files.
For example in filezilla you can set the over-ride option here:

An automation to download a file to my laravel project

I have some files I want to add to my laravel project on a regular basis say every hour
till now I had to download the file manually then move it to my laravel project
any particular thing I should look for to have this done?
You can write the command to create a file, and download or email the file to the system or user. After that, you can run a cron job of this particular command. This will solve your issue

How do I view the files on my server?

I am developing a web application using Laravel. I am using Laravel Forge with a Linode server and GitHub. My site is live at the moment. Whenever I change the code, I commit the changes using GitHub for Windows and then deploy the website on Laravel Forge.
One part of my application allows a user to upload a file. This works grand. I can upload a file and then download it from another computer on the website. However, I am not sure how to view the files on my server. They are not appearing on GitHub, and I cannot see anywhere on Laravel Forge to locate these files.
Anyone have any ideas?
The files are definitely there as I said, I can download and view the files once they are uploaded. I am storing them in a files folder in my public directory.
I guess your problem is that the versioner(Git) is ignoring your files.
Verify that where your files are stored and that the .gitignore files in each folder do not ignore them
*
/ Storage_path
Storage_file.extension
*.extension
Modify your corresponding .gitignore files and then commit everything

How to download on open SFTP file in Netbeans IDE?

I'm using Netbeans 8 with remote files project.
The files are located on remote server and Netbeans access them via SFTP.
I would like that Netbeans will download fresh copy every time I open a file, same as notepad++ does.
any idea how to do that?
couldn't find solution on the web.
I ended up here after looking for an answer for the same question. I couldn't find automatic download of fresh copy during every time you open the IDE but there is an option to Download manually.
Right click on "Source Files" of your project in "Projects" window and click "Download".
If you are looking only to download files which are modified in server directly then you go for "Synchronize" which is just below the "Download".
Cheers!
You have to go on new project, and then press your java file, then make a name for your file then you are in.

sync project in netbeans both ways via ftp

I have a question about netbeans.
I made a new netbeans php project, configured it with the existing ftp settings, and it started downloading all the files to my local hd, so far everything is working correctly.
but because I'm using a php framework, which will automatically generate some files for me makes a file, it won't be synced to my local hd.
So my problem is as long as I make new files in netbeans it will work correctly, but when files are generated outside netbeans it won't.
How can I configure netbeans so it will sync both ways via ftp?
You can't as far as I know. You have to manually right click on the project/folder you want to update and click Download or Upload. Note that this will overwrite any changes on the receiving side (e.g. downloading files will overwrite local changes and uploading files will overwrite remote file changes).
Alternatively, you can have the Upload Files On Save or On Run options enabled, but this will only work for local->remote synchronization scenario. You can access this option by right clicking your project, choosing Properties and following the screenshot below.

Categories