How to install a project from github based on yii - php

I'm a newbie studying how it works YII. I found this project interesting.
Yii2-simple-classified with app-advanced
https://github.com/deviardn/diadoo
I read the documentation but I do not know exactly what I should do to be able to test it on localhost.
I already have YII2 installed with composer.
what should I do?
Thanks for your kind recommendations.

The project looks new, the author should explain more. In general, usually I clone the project first
$ git clone https://github.com/deviardn/diadoo.git .
Install the project with composer
$ composer update // or install
Initiate the code with this command, and set it to Development
$ ./init
Initiate the database migration, if necessary
$ ./yii migrate
And lastly, give it a try from your browser, access the localhost.

Related

What would a Laravel deploy script look like?

I'm using Buddy Works to deploy my project to a server.
When creating a pipeline to deploy my Laravel project, I'm asked to enter deployment actions; this is where I'm stuck.
So far, I have set it to run the following composer commands:
composer validate
composer install
Because this is usually what I do when running my project locally. But I understand that I also need to run Apache and such (I use WAMP so it sorts all that for me).
I've searched on Google and all I got was composer install. Is this all I need to do or is there more?
Prior to using deployment tools, I used to upload files directly to the server, so CI/CD or other DevOps duties are very new to me.
It's good idea to reload php as well as migrate new tables :)
composer install --no-interaction --prefer-dist --optimize-autoloader
echo "" | sudo -S service php7.3-fpm reload
php artisan migrate --force
If you're using DigitalOcean and you have $12 to spare you could use ready tools such as Laravel Forge :)

How to run "composer update" on test/production server?

I'm developing an application in laravel, I have completed it on localhost, but when I run it on test server it shows me error
Class 'Collective\Html\HtmlServiceProvider' not found
I think it need to update composer. But how do I do it on test server..!
Please help me I'm new to laravel and web hosting.
Thank you.
You have to do a
composer install
you have 3 options
Copy /vendor folder via FTP - simple
Install and run Composer via terminal - can be forbidden
Run composer update from PHP
This is complete solution for 3. with description.
https://stackoverflow.com/a/38396047/2583652
code here: https://github.com/whipsterCZ/laravel-libraries/blob/master/public/composer.php

Starting with Spark Laravel

I'm trying Spark and, after install it, I have two problems:
1.- When I try 'Log in' and 'Register' buttons, I get this. It is like if my web page with no style. Any idea what I am doing wrong?
2.- On the other hand, I'm following the Quickstart guide and I'm trying this:
"Once Spark is installed, make sure the NPM dependencies have been
installed via the npm install command, the gulp command has been
executed, and the database migrations have ran."
I'm running npm install in my Terminal and I'm getting this: -bash: npm: command not found.
I did some things with Laravel more than one year ago, and it was with no Homestead. Probably I'm doing something wrong... I'm pretty confusing.
Any help would be really appreciated! :)
You will need to install node and npm:
https://docs.npmjs.com/getting-started/installing-node
Once node is up and running you should be able to run "gulp" from within your application's main folder. This will generate (among other things) the CSS that you're currently missing.

bash: laravel: command not found

I am Using my own Machine Kali Linux 2.0 Debian x64 . Now, i have Installed Laravel in my directory structure like
/opt/lampp/htdocs/learning-larvel/
Inside the Learning-laravel folder i have Installed my Laravel files, and also i installed composer. So when i go to http://127.0.0.1/learning-laravel/public . I see a See a White Screen and in Between it is written "Laravel 5", which means the Laravel GUI Setup is fine.
Now, to create a new file for Laravel, when i open my Terminal and type
laravel new xyz
then it gives me a error which says bash: laravel: command not found
Now, how can i fix the error.. I have researched about it by setting PATH to bashrc. But i am not getting it fixed right. Additionally when i type in my command composer -version then also it says bash: composer: command not found but i have Installed composer on the folder learning-laravel itself.
I could also see files like composer.phar there in /opt/lampp/htdocs/learning-larvel/
Any help would be extremely thankful.
As the composer official getting started page points out:
There are in short, two ways to install Composer. Locally as part of
your project, or globally as a system wide executable.
if you wanna do composer -- or laravel -- in command line, you wanna install them globally.
Check out the following links:
https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx
https://laravel.com/docs/4.2#install-laravel
I encountered the same problem. Apparently, the composer exists in path ~/.config/composer/vendor/bin when running as super user. Therefore, replacing the paths which were described above by this, and it should work. Hope it helps.

create symfony project using the symfony installer

i used to to use composer to create a new symfony project like so
composer create-project symfony/symfony-standard-edition SymfonyProjectDir 2.5.*
but know when i want to use the symfony installer i use the command
symfony new SymfonyProjectDir 2.5.*
or
symfony new SymfonyProjectDir 2.5
but i get this error
[RuntimeException]
The Symfony version should be 2.N.M, where N = 0..9 and M = 0..99
new directory [version]
how can i tel that i want to use the version 2.5 including the last updates from symfony like i used to with composer?
There is no reason to have the latest minor version of an version. You start developing with the latest version and then you should freeze it until there is a reason to update.
If you don't care, clone the git repo, grep your tag and create your project with it.
You can try this, it worked for me:
Symfony Installation and Project Creation
Or just open command line and execute these commands:
for (linux/mac)
sudo curl -LsS http://symfony.com/installer -o /usr/local/bin/symfony
sudo chmod a+x /usr/local/bin/symfony
symfony new SymfonyProjectDir 2.5
The version will be the most recent version in 2.5, as you want
Last answer here is from 2016 so if you end up here somehow in 2019 the solution is much easier!
First make sure you are using a php version of 7.1 or higher.
Check if you have composer installed and if you don't just follow this easy documentation: Download/Install Composer
Now you are all set, go to the directory where you want your symfony project be stored and enter the command composer create-project symfony/website-skeleton my-project. This will create your first structure in symfony 4!
Now you just enter your project directory and type php bin/console server:run on your terminal and you are done.
You can import repositories from git too starting git init from the same project folder.
First time with Symfony? Follow this tutorial for a first controller/view: Introduction to symfony4
Hope this if somehow usefull to anyone, i'm just trying to give something back to this community that has given me so much.
Please try with it:
composer create-project symfony/framework-standard-edition SymfonyProjectDir/ 3.0.7
It should work. Maybe your forgot the last slash...

Categories