How to integrate laravel packages? - php

my next question is about Laravel, especially how to integrate custom packages. I have downloaded that package:
https://github.com/Riari/laravel-forum
Following the instructions i have installed it and registered the Providers, but now i am not able to integrate that forum in the laravel application, that i am developing. I am newbie to Laravel, so i have totally no clue how to start with.
I have searched for any tutorials, but found nothing.
If anybody can show me how to integrate the above package or give me a nice tutorial about integrating packages with laravel i will be thankful.
Thanks

Did you try running the following command?
composer require riari/laravel-forum:~3.0
That should update your composer.json and add the new dependency.
Also, have a look at the guide that you can find in the repo.

Related

How to use composer in a localwp project?

I’m a newby on using composer, git, etc, in fact I’ve never used them, but I need the Spaces API PHP library (which requires composer) for my project.
Since LocalWP includes composer, could anyone tell me in detail how to integrate it into my project?
The tutorials I've found are not ment for LocalWP specific case. All of them teach u how to install composer, but since LocalWP has it already, I don't know how to apply it to my project.
My System Details:
LocalWP latest version
Windows 10 Pro
Chrome
VS Code

How to update a legacy concrete5 package

A long long time ago, I've developed a concrete5 package for concrete5 <= 5.6 for a small non-profit organization. Now, because it has never been upgraded, there are some issues that I can't easily fix, related to the old PHP version. Therefore, I'd like to migrate the web site to a new installation of concrete5 version 8. However, for a fresh install of the latest concrete5, of course my old plugin no longer works. What are the steps to update a legacy concrete5 package to work under the newer concrete5 versions? I couldn't find any info or guides online unfortunately. I have looked at the new documentation on how to develop a package for concrete5 8, but found it very scant. I've changed the namespace of my controller for example, but this is not enough to let the package function. Any insights would be greatly appreciated!
Edit: the code is here
The folder and file structure is mostly the same. YOu have to use namespacing in your classes now. Package controllers have changed a bit in what they extend I think. BLocks are mostly the same. Using JS and CSS assets still works the old way if you prefer but there's a new and better way with asset management.
Feel free to contact me by PM on the concrete5 website my username is mnakalay. There you can tell me more about your package and what it contains (blocks, attributes...) and I can give you a few pointers

Yii2 Framework - Custom Installation Template

When I access to Yiisoft account on Github:
https://github.com/yiisoft
I see 3 pinned repos: Yii2, Yii2-app-basic and Yii2-app-advanced.
I know When I run the command:
composer create-project [template] [project-name]
I can create a project using one of installation templates. Also I know on the composer.json on this templates is set yii2 framework and yii2 bootstrap as dependencies, so they get downloaded.
What about if I want to create my own installation template, is there a guide how to do it?. I know it would not be that productive but just wondering out of curiosity.
UPDATE
I have noticed that just a couple hours ago this page was published:http://www.yiiframework.com/doc-2.0/guide-tutorial-start-from-scratch.html
but still it is based on the basic installation template, not a totally custom one.

I am installing SiteSupra (CMS) and its dependencies using Php Composer

This is a Symfony Based CMS and require Packages from Git.
I am totally unable figure this out. Please do help, there is a demo site of this cms as well as a Core.
This the repository of Core Base | https://github.com/sitesupra/sitesupra
Hope I Find a Solution
Here's the screenshot of errors I am facing in Composer

How do I use a Laravel package created by me in production?

I'm writing an app using Laravel 4.2. This time, I needed some extra functionality and I decided to create a package. I used the workbench functionality as described in Laravel's docs.
Currently (and locally), the package is very small but it suits my app very well. I don't think this should be published to the community because it is still very green. I'll put a few hours into it when I finish with my app but I can't right now.
Now, I know the workbench/ directory is not to be pushed to production. Then, how do I use my package on production?
So far, I heard I have to push the package to GitHub (which I already did), and then publish it on Packagist. But I feel that publishing the script as is won't be helpful to others and might as well harm those in search of this functionality (like me a few days ago) on this so under developed package.
Is there a way to add my package to my app's composer.json and have it installed without publishing it to the community while it's under development?
What you are looking for is "private repository". Inside your composer.json file you can define an object repositories where you can define other locations to search for this repository
Detailed explanation can be found on Autoload bitbucket repository. The same principal is true for github.

Categories