I have scoured the web for hours but I can not seem to wrap my head around this. I am developing a Laravel project where I am using the dependency UniSharp/laravel-settings. However, I have noticed that after upgrading my Laravel version to 6.0, the package breaks. I have figured out what I need to do to make the package work with Laravel 6.0 and now I wish to make the required changes and then use the modified package.
So far, I have cloned the original repository into my own (i.e realnsleo/laravel-settings) and I have cloned it onto my development machine. The trouble is, I don't know how to test whether my changes work. Do I need to setup a fresh Laravel installation to test the package? I noticed the package has it's own composer.json file, should I install those dependencies separate from the installed Laravel project? I am highly confused.
Can someone assist me with a step by step on what I need to do to achieve this? I will highly appreciate it. Thank you.
Related
Im very new to laravel and ive a project on a server that uses laravel.
How can i download this project and run laravel to it ? I managed to run laravel but it creates a whole new folder etc.
when i tried coppying the project folder to the laravel-created folder i got an error.
Download source code except vendor casus it's extra. Install php and composer. Then use a terminal(cmd in windows) and go to your project and run composer install. Wait till downloading packages complete. For running project type php artisan serve and your project is up. If your project had migrations and I think it has actually, run php artisan migrate before running serve command. Also check .env file in the root of project and change database credentials with your own. Depending on what dbms that project uses, you should install that DBMS too. Good luck
Taking reference to your comment:
i have the source code of a project that runs on laravel. Basicaly i am asking how can i run this source code localy on my pc
Good, that you have a project that runs on Laravel. You should probably consider to move your project to a central place, maybe Github, and from there create a proper workflow for development and further deployment to your (testing, production, ...) systems.
Even if you develop alone it would be a good practice to use git and Github - no, it is not the same
To come back to your original question:
How can i download this project and run laravel to it ? I managed to run laravel but it creates a whole new folder etc.
You don't need to install a new Laravel into an existing Laravel project. Just take the existing one.
I have a large project running on Laravel 4.2 and now I would like to upgrade it to the latest release (5.4)
On the upgrading guide I can see the steps to upgrade from each release to the next one, but the 4.2 to 5.0 requires a fresh install. Hence the question: should I install 5.4 (and fix problems) or 5.0 (running each upgrade)?
I'm possibily using any Laravel functionality, and have organized repositories for my own custom methods; I also need to maintain the database. I need to upgrade because I would like to use event bradcasting with Laravel Echo.
Thanks
To those looking for an answer: update directly to latest version, then fix changes along the way.
Explanation:
At first I tried to upgrade version by version; it was a pain. Every single vendor had different packages for each version and that caused issues even before correcting the code. I couldn't start fixing my code because the installation requirements of the vendors were failing at a certain point of the upgrade process.
Upgrading directly to latest version requires the correction of many things, but at least those are only related to your code. In my case I had to remove Sentry (authentication), Laravel OAuth, and some others I don't remember in favor of some native packages which I hope will be maintained properly. The upside of this approach is that once you have all the packages you need installed you can work directly on your code... which is what you have to do anyway.
what is the best way to use an exist laravel project to create a new project.I copied my project floder and I renamed it but it does not work
Please, somebody help me!
You will still need to install the dependencies through composer as well as any node dependencies you have.
Run composer update on the new project.
Also make sure your file permissions are correct on the new project.
In my opinion the best way to do this is Version Control System.
Step 1: Create Repo of your existing project
Step 2: Fork your Repo, this will allow to choose another project name and so on
You will be able to use your first Repo as template any time when you will need without copy/paste of files on your local
Ive been reading a few articles on the net about package development but cant quite wrap my head around the basic setup. Ive written jQuery plugins with releases and published to Bower in the passed so maybe im just not understanding the difference with Laravel.
With jQuery plugin dev I would just exclude my dev required dependancies through bower.json to prevent a person pulling in my dependancies. It seems that with Laravel u create an un-tracked Laravel framework folder and put your package into the vendor folder and track only that with Git? So basically the Laravel project sitting outside of my vendor package is just some files on my PC? Surely I would want to track which version of Laravel the package was developed on?
OR should I create a "base" Laravel repository and create another repository inside the vendor folder so make sure I know which Laravel the package was built on?
Documentation and tutorials are very vague...
Your question looks a little bit confuse. I develop packages for Laravel and the following is a regular way:
Laravel manage its dependencias via composer, take a look into composer.json to get a clue how similiar is with bower.
In order to get yout package compatible with laravel's core you need to implement some interfaces in your package. This package also can manage dependencies via composer.
A package can be created as a repository in different version controls, like Github, BitBucket, Packagist, Cartalyst, private packages repositories, etc. By default laravel pull packages from Packagist, but into composer.json file you can specify another reposository as needed.
When you trigger composer update (this is an equivalent as bower update), this dependencies manager will pull all the packages and download them automatically in vendor/ directory.
How to code your package while testing with laravel? some people do the following, including me:
Install a laravel instance just for package development purpose.
Create a new project (your package project) inside of vendor/project-name following lavavel's package requirements.
Keep working your package from this project location. By this way the changes are reflecting instantly in laravel installation.
Don't forget to commit and push
I'm guessing that it needs to be done differently since it is dependent on the package, and the directions after I install it (doesn't tell me how to) are to add it as a service provider like so:
'Rocketeer\Plugins\RocketeerDatabaseServiceProvider',
And there's a 'Plugins' directory within the Rocketeer package.
Has anyone installed a plugin for a package before? I would greatly appreciate the tip
In theory you should get the plugin via Composer, add the provider to app.php (or local/app.php depending on whether you're requiring Rocketeer as a dev dependency or not) and that should be good. That being said, what Rocketeer version do you use? Because that particular plugin may just not be compatible with Rocketeer 2