Laravel Spark Composer Update only changes vendor folder - laravel

So, I am not totally well versed in composer and Laravel spark and it's been awhile since I have done this so forgive me if this is a silly question.
I updated Laravel Spark from version 1 to version 2 and then 3. I need to make use of the afterLoginRedirectTo function which was not available in version 1. Composer update ran fine and I can see the function in the file named "ManagesAppOptions.php." However, it does not appear that any of my files outside of the vendor/Laravel/Spark folder have been changed. I ran composer install and that didn't do anything either.
Am I missing the point here and I just need to push the changes to the vendor folder to the production side?
Do I need to run gulp or something to rebuild those files in my app folder? Are they not changing because Spark thinks that I manually changed them already? If so, how do I force that to update?

Related

How to make changes to Spark Laravel Billing page?

I am trying to make changes to the Spark Laravel BillingPortal.vue page. After making a change I know the the app.js is being compiled but I see no change in the billing page.
I have cleared the cache in Laravel and the browser and still not luck.
I can completely delete all code on the page and still nothing happens. It is still the same in the browser.
Please tell me how to change this file.
The BillingPortal.vue file compiles into Spark's /public/js/app.js file, so in order to see any updates you'll need to rebuild Spark's JavaScript separately from your application's assets.
cd vendor/laravel/spark-stripe (or vendor/laravel/spark-paddle if you're using Spark Paddle)
npm install
npm run dev
That being said, it's not recommended that you make changes to Composer packages because the changes will be overwritten when the package is updated. Instead choose one of the options mentioned in these answers

Where Can I Directly Download Laravel Dependency Folders/Files from without using composer

For some reason, composer cannot work on my PC and wamp also (for now) so I downloaded the laravel zip folder, "laravel-master.zip".
I unzipped and uploaded this folder to my online production server but I noticed that I do not have the vendor folder. It was not included in the laravel-master folder.
So my question is... from where can I get the vendor folder (and any other folders/files) so I can manually add them to my laravel installation?
I will follow the same logic as the other saying. It is useless (and this is not recommended) to copy the vendor files because they are updated frequently and not stored.
the problem is that without composer, it will be difficult to work with Laravel (not only for class loading, but also unable to share your project later).
To use composer with WAMP, you probably forgot to specify during the installation, the php.exe WAMP to use. Located in C:\wamp\bin\php\phpx.y.z.
Here are two links that will help you achieve this. (You can uninstall your composer before to start from scratch)
Question and Answer about use composer in WAMP
Video about install composer and use it in WAMP
Then you just might be in the root of your project a composer update.

Laravel new version/upgrade for my custom application

I have a Laravel 4.2 application and it in production environment.
Sometime i have bug fixes or updates for it in the local edition, I want to know how do i move these changes from local to production.
Replacing just the file/class that was changed doesn't work. I tried replacing just the controller file but it doesn't work.
Does Laravel compile the code somewhere that i need to upload to production server, What all do i need to change/upload in production to reflect the changes?
By default, PHP is not a compiled language, so changed and uploaded files will work without any special process. Laravel is just PHP, so it follows the same rules.
However, Laravel uses an autoloader that keeps track of all of your classes. When you add a new class, you need to tell the autoloader that it exists by running:
composer dump-autoload
This will scan the available classes and update the autoloader list.
If the problem persists after you run composer dump-autoload, or if you did not add any new classes, there are three potential problems to consider:
Did you upload the files correctly?
Log onto the production server and look at the timestamp of the uploaded files. Do they match your expectation? Consider opening the files in production to see if they contain your latest changes.
Do you have a caching or compiling system in place?
While PHP is not compiled by default, there are tools available that allow you to compile it, and other tools that allow you to cache the output of the scripts. Ask your server administrator if any of these tools are being used.
Do your changes perform as expected?
Finally, check to see if your changes are in production, but not operating in the way that you expect.

Laravel 4 - Developing & deploying web application for other users

Although I'm new to Laravel 4, there has been one question on my mind since day one which I cannot seem to understand, nor find any information on.
My plan is to build an open source web application, which other users will be able to download and use on their own server. Now my current way of working is:
Install Laravel with composer
Add packages to composer than I need for the application
Start coding: editing files directly inside of app/ (global.php, routes, controllers, views, migrations etc).
Keep all of my assets within /public/assets/
This works fine for me, and I have no problems with it. However the question is:
How will I deploy the application to users if I build it this way? If they install Laravel via composer, all of the files within /app will be default (obviously), so how would I go about getting my edited + custom files into their install of Laravel?
Do I have to build the whole application as part of my own bundle? Or is there some kind of way composer can pacakge what I've done to solve this problem I can see happening?
I'm just throwing words out, if someone could explain and point me in the right direction that would be great.
Thanks.
You can just chuck all your files on github. You dont need to include composer. People can download composer and run it from the install directory (or if they have it globally run it from there)
If you run a composer install with laravel 4 only, it will download all fresh. In your case you just have all the library's in place already. So for future updates you as a developer can easilly upgrade to a newer version. The "users" can simply say "git pull" to update their instance. You still need composer to do your initial install (db seed, post install steps etc)
At least that is my point of view. Just look at a simple laravel 4 bootstrap example https://github.com/andrew13/Laravel-4-Bootstrap-Starter-Site it also holds all the files.

Laravel framework size

I just downloaded laravel 4 via composer and i see that the size of the vendor folder 26mb.
After i checked all packages inside the vendor folder i saw that most of them have files that aren't needed in a live website, like tests or readme files.
I must delete those files manually or is there another way?
All those extra packages are required by laravel?
Laravel 3 was very simple, that is why i started using, i never thought a new update could be so different.
Depending on how you installed via Composer you'll also have the Git history of each of those dependencies. You can drop the filesize even more by running composer update --prefer-dist to instead download archives instead of cloning the repository.
In the long run though, disk space isn't exactly expensive in this day and age. I can understand you might be a little concerned about it but you shouldn't worry too much. It doesn't have a huge impact on the overall performance of your application. If you optimize the Composer autoloader with composer dump-autoload -o and run php artisan optimize to generate a bootstrap/compiled.php file you'll still great excellent speed.
In comparison Laravel 3 is very simple. But Laravel 4 has embraced the future and ships with some awesome functionality.
At the end of the day there is no reason for you to upgrade to Laravel 4 if you don't see the need. You can safely continue to use Laravel 3 as it will be patched for any security vulnerabilities or bugs.
For more information on the number of files, see this forum post.

Resources