So I’ve just finished developing my Laravel 5.2 web application that uses AdminLTE. It is an Asset Management System with some budget and invoice functionality, which will assist me in making my full-time job as a Systems Manager easier.
It’s not the most complicated app, but I’m proud of it, so I want to share it on GitHub, so others might be able to make use of it, as well as having my code available for future when I start applying for development jobs.
Now I’ve tried my best Google skills, but I just cannot figure out how to go about sharing my code on GitHub. I've used Bitbucket during my development phases, as I wanted to keep it private.
If anyone can please direct in the right direction about what steps I should be taking now to actually share my app out there. Should I be looking at something like Packagist instead, as I’m sure I’m not supposed share Laravel along with my web app. Any help will be greatly appreciated.
This question is not about how to upload my project to GitHub, but specifically about what the correct procedure is for Laravel projects and how to share them for others to easily use.
You just need to create a project repo and upload all your project code there.
If you didn't modify any core file in vendor directory, then upload the all code except vendor directory.
once uploaded, add up some readme.md file to tell some guideline/instruction for installation the project.
make your repo public so other can access it
Related
Laravel Folder Structure
I developed a CMS with laravel which I want to use for multiple websites. My goal is to have a single place to develop my CMS further and don't have old "CMS code" in older websites.
The problem is that I dont know how to structure my laravel folder structure.
This is what I have in mind:
--cms
--website-1
--website-2
--website-3
each website must have it's own
- public folder
- .env file (or config for database and other website specific settings)
- routes
- resources(views, assets)
- controller('s)
- lang files
- etc.
Development Environment
In development I want to use the website's domain(website-1.test) as indicator what website folder should be used.
Production Environment & Git
I use forge to deploy my websites. My idea is to have a git repository for the CMS and a git repository for each of the websites. In the websites repositories I only push the website folder. In the CMS repository the whole project is saved but all the website folders are .gitignored.
So for the production server i had this folder structure in mind:
CMS (git repo)
website (git repo)
When updating the front of a website I push the website repo, if I want to update the CMS I push the CMS repo.
Conclusion
Bare in mind that these are my first thoughts and I am aware that my ideas might not be possible at all. I'm looking for advice and suggestions for my situation. If it can be achieved in another way or a better way I'd be glad to receive advice on that.
Thanks in advance!
Ok .
It is not posible in same project.
But you can make subdirectories for you domain name.
It will become website-one.yoursitename.com.
And this each subdirectory will have its own files.
Thats all you need to accomplish what you want.
Regards.
I have two initial ideas of how what you are asking for potentially could be achieved:
API
Make one repo for backend creation through CMS in witch you can create multiple APIs for various sites. Then make a front-end repo for each site that calls the corresponding API.
https://laravel.com/docs/5.8/eloquent-resources
Package
You could make a composer package for your cms code and then pull that package in to each of your website project
https://blog.jgrossi.com/2013/creating-your-first-composer-packagist-package/
I am new to Nextcloud app development and would like to create a simple app to play around. I saw that some apps are made with Vue.js, so I’m asking if there is a guide out there?
I generated an app skeleton and played around with the PHP templates but unfortunately I don’t know PHP and would like to create a Vue.js project into this existing demo app.
I found some premade Vue components for Nextcloud
https://github.com/nextcloud/nextcloud-vue
but no step by step guide on how to setup the Vue project after creating the skeleton app. I just saw that the Nextcloud app Tasks is also using Vue.js within the PHP code:
https://github.com/nextcloud/tasks
Thanks a lot for help.
I've looked at the repository you mentioned and it's fairly easy to setup, the question is what would you deserve after setup? If you clone the repository you have something like a 'working copy' of the plugin. But this Plugin needs to be build and the resulting package needs to be copied to right location at the nextcloud server (or maybe you have to install the package over frontend). This is some type of plugin and not a full web application which could run standalone, as I understood.
It's not like you said:
Nextcloud app Tasks is also using Vue.js within the PHP code
It's more like PHP is used for Backend and Vue is used for Frontend, these two 'projects' are completely independent from each other (PHP is backend and Vue is frontend there are no direct dependencies). Just create your Vue application (after build you will have an index.html and several js and css files) these files have to be available from browser. Then your applications entrypoint is the index.html. For PHP: You will just define Interfaces and Routes here which will give you the possibility to interact with the serverside. Then later to deploy your plugin, you have to package it in the format nextcloud needs. You can read from Makefile in the Tasks repository what happens if package is created.
I think a good starting point for you would be: https://docs.nextcloud.com/server/15/developer_manual/app/tutorial.html
I have been developing in Codeigniter for awhile now. I have recently read that Laravel is currently the most modern and best framework. I am interested in learning it for my next project. I'm hoping that someone could help to answer some questions that I have about Laravel.
1) How would I host it? Laravel seems to rely on composer a lot and that requires a terminal. For CI, I just download a folder and load it up to my Webserver and I can run it.
2) Dev environment. I have been using Netbeans that is connected to my server and it can push updates instantly. I want to connect it to git soon for some versioning as well. Is it the same for Laravel? How would I update it?
Same here, I have been developing Applications in Codeigniter 2,3 for past 5 years and now I am learning Laravel and have starting making beginners level application in Laravel Here are my findings which might help you
Difficulties
For Codeigniter Developer, Instantly playing everything by using router is kind of difficult. Although router is used in codeigniter as well
Installing and setting up Laravel seems like a tricky and very lengthy job especially the use of composer which is an extra thing as compared to codeigniter which is just download and uncompress or copy paste installation procedure.
But Why Laravel?
Object Relation Modeling - Eloquent ORM
We can easily create relations and joins with query builder or active records in codeigniter but to enforce referential integrity in database, we have to write triggers in our database or define relations. Luckily in Laravel the relations are made with one line of code and does a lot of job. Whereas in Codeigniter that's a lot of manual code writing.
Integration of off the self Packages.
There are thousands of developed packages readily available on packagist, which is a repository composer uses to download software packages. You just have to write one or two lines of code at composer terminal and it does all the rest, create models, controllers, views. All you have to do is include them or change the styling as per your layouts.
Think of Laravel as a PHP framework for extremely lazy developers who want to write very less and re-usable code and do lot of work from it.
Learning Resources
Laravel 5.2 from Scratch that's the one I started with, excellent course and Modern Web Development with Laravel
Uploading on Shared hosting
Click here for tutorial
Is there an easy way to incorporate changes to the main Laravel app, when there are framework updates, other than manually incorporating the changes described in the documentation (http://laravel.com/docs/5.1/upgrade)?
I'm thinking some kind of composer command that patches the main app and not only the vendor dir. Does such a thing exist?
Thanks in advance.
Apparently, Shift is exactly what you're looking for, although it's still in its alpha. You can contact its creator if you want to help him test the tool.
Reference: http://jason.pureconcepts.net/2015/11/laravel-automated-upgrade-tool-shift/
I am continuing on someone's project developed on Yii. The guy has to transfer the files to me. What I got was a folder with project files and folders (such as protected and public) and a db dump. I am currently testing it on wamp. I have imported the db dump using phpmyadmin, and also updated the db access credentials in project\protected\config\main.php.
I have worked a lot on php and its frameworks, but this is my first experience with Yii. I tried to google but every tutorial tells how to create and run a new project and not an existing one.
So can someone please guide me as how can I run this Yii project?
Go through docs first
The official web-site
Class Reference
Building a blog tutorial. This must answer all your questions