i want to install git-hub below package:
" realrashid/sweet-alert "
package in my laravel online running project
my project running in cpanel shared host
Any help in this ?
Connect SSH / Terminal
Go to your project root folder like cd prohect-path
command run composer require realrashid/sweet-alert
if composer is not install then first install composer in your live server.
or
you can follow step #Mo5tafa
Install whole composer packages locally, and move your project to zip/tar.gz file and then upload your zip file project to shared host (with cpanel file manager or filezilla), finally unzip your project.
Related
I've already install XAMPP and composer. My XAMPP is 7.4 and my composer is using composer 1. I'm not yet upgrading to composer v2.
How can I install this project on my computer? The project seems to be located at https://github.com/erleiuat/Atta.
Steps to be done:
Open git bash or terminal or command prompt on Windows.
Change directory to htdocs
Run command git clone gh repo clone erleiuat/Atta
In your browser visit: http://localhost/Atta/index.php
That should do the work.
I'm trying to learn Laravel and follow the instructions in their tutorial to install the framework on my shared hosting. I've disabled the secure-http option in composer but it still won't download the framework.
Called:
composer global require "laravel/installer"
Response:
Changed current directory to /home/sledzko/.composer
Warning: Accessing packagist.org over http which is an insecure protocol.
[LogicException]
Composer repositories that have providers can not load the complete list of packages, use getProviderNames instead.
What can I do to download the framework using composer?
Most of the shared hosting is not supported terminal/command access, that why it is not possible to install Laravel using composer on shared hosting.
But there is a way to use Laravel in shared hosting, you can install/setup Laravel project on a local machine and after that upload project (all directory structure and files) on your shared hosting. Only need to adjust public directory and bootstrap path in the index.php file.
Upload all files is in public folder in your shared hosting www/public_html folder, and all other folder structure in the separate folder. After that go to your index.php file in www/public_html folder and update below two linew with your path laravel folder path.
require DIR.'/../bootstrap/autoload.php';
$app = require_once DIR.'/../bootstrap/app.php';
Install package locally using Composer. The package folder will be created in the vendor path.
Copy vendor/packagename folder and paste it into your host's vendor path.
Replace your host vendor/composer folder with your local vendor/composer folder.
Replace your host composer.json with your local composer.json
please try:
composer create-project laravel/laravel --prefer-dist YOUR_PROJECT_NAME
This will help you to download the stable version on your machine!
If you use SiteGround you will be a lucky man, just must request access do ssh (over cpanel), and then run your composer command on terminal.
SiteGround servers already have composer globally installed.
BUT... you you want to do it on hard way, access you shell on Siteground and run:
wget https://getcomposer.org/composer.phar -O ${HOME}/composer.phar
echo "alias composer=\"/usr/local/php72/bin/php-cli ${HOME}/composer.phar \"" >> ${HOME}/.bashrc
source ${HOME}/.bashrc
composer --version
Just pay attention on php72 version, it's uses PHP 7.2. If you want or need another one do a ls /usr/local/ to see all versions.
I m a newbie and learning Laravel. I m having a trouble with install php and homestead.
As I read in Laravel Official Website:
Laravel Homestead is an official, pre-packaged Vagrant box that provides you a wonderful development environment without requiring you to install PHP, a web server, and any other server software on your local machine.
So I think I do not need to install php in my local machine ??? But when I install composer, it requires PHP.exe and I cannot browse that PATH. I misunderstand here. I have been stuck in this problem and research many websites for whole day, so I think better to ask (even if it is stupid question). Could anyone explain for me please...
---EDIT_NEW---
This is my completed steps to use Laravel:
Install git
Install virturalbox
Install vagrant
vagrant box add laravel/homestead
git clone https://github.com/laravel/homestead.git Homestead
cd Homestead, bash init.sh
Configure Homestead
add to Hosts file
Now I have to install laravel, it requires composer. Composer installation requires php.exe PATH. But if I dont use XAMPP or others local development environment, how can I install Composer ?
(Note: Maybe I misunderstand here "without requiring you to install PHP, a web server, and any other server software on your local machine").
Are you executing composer "inside" Homested vagrant VM or in windows "cmd"? In the first case it's strange in the second of course it doesn't work. You need to acces the Homestead VM via SSH
Thanks for help, with your answers and Laracast Video: https://laracasts.com/lessons/say-hello-to-laravel-homestead-two. Now I got the answer.
You need to follow some steps to running Laravel in your system (windows 10).
1) Install XAMPP or WAMPP, you can download XAMPP from Here.
2) Install composer, find it from Here.
3) Install GIT (optional).
Than go for create New Laravel App.
1) Open Terminal -> goto C:/xampp/htdocs/
2) composer create-project laravel/laravel <App_Name>
3) php artisan serve
I have a setup a Laravel 5 project locally and want to put it on bitbucket account so that my remote team mates can install it. Locally from command line I ran following command:
composer create-project laravel/laravel myproject --prefer-dist
which did everything. Now it sounds stupid to put all. I already uploaded my composer.json file. What instructions should I send out to team so that they just clone directory and install it? Do I dump each thing and they just clone it? Will they have to run composer create-project command anyway?
Here, no need to run composer create-project, they just clone the project and run composer install to deploy the project in their local.
As composer install will install all of the framework's dependencies, don't upload vendor folder to source (Bitbucket).
You can send following instructions
Project requirments
List of tools and technologies to run the project
Ex: PHP and mysql version, Frameworks (js, css) used and tools required NodeJs, Gulp, Bower or any other
Installation process
create folder project_name and clone project into it
open composer.phar and run composer install
setting up environment to run project with required tools
I am on a windows 8 machine and I'm trying to learn laravel. I copy and pasted my PHP folder from C:\xampp to C:\php, installed composer, ran composer install then composer create-project laravel/laravel learning-laravel. So far everything was created so I went into the directory and tried to use 'php artisan serve' and got the following error.
C:\Users\denni_000\learning-laravel>php artisan serve
Warning: require(C:\Users\denni_000\learning-laravel\bootstrap/../vendor/autoloa
d.php): failed to open stream: No such file or directory in C:\Users\denni_000\l
earning-laravel\bootstrap\autoload.php on line 17
Why you copied php folder
download composer install it.
download laravel latest version and store it on your xampp/htdocs/laravel
and run cmd with composer install command
For more follow install laravel on windows xampp
or Laravel 4.1 installation with composer in xampp
For windows Simply download Laragon which includes latest php 5.6.7, Apache, Mysql, Redis, Memcached an alternative to Xampp or Mamp with small size. Easy to install laravel and create project with auto create virtual host by it. Thank you.
U need to go to the directory where laravel is installed and run the following command.
composer update
Install Laravel 4.2 with composer:
sudo composer.phar create-project laravel/laravel project-directory-name 4.2 --prefer-dist
Here is a different way to setup laravel, may be you guys will like it
Step 1:
Clone https://github.com/laravel/laravel or you may download zip also.
Step 2:
Navigate to downloaded folder in command prompt and run composer install
Step 3:
open the folder and rename .env.example to .env and update the credentials mentioned in file.
Step 4:
After these steps if you navigate to the directory from web-server it will cause an error No supported encrypter found. The cipher and / or key length are invalid. to fix this just run php artisan key:generate
Done!
Hope you guys like this way :)
You need to install all the laravel required dependency.
To do that, you need to tell composer to install everything needed.
Below is the command to use to install that's required in laravel composer.json.
composer install
Follow the installation guide from Laravel
Install Composer:
Like Laravel.com says: "Make sure to place the ~/.composer/vendor/bin directory in your PATH so the laravel executable can be located by your system."
Type the following statement in the command line:
composer global require "laravel/installer=~1.1"
Create a fresh Laravel project in a specified directory with the "laravel new" command:
laravel new blog
You can also create a Laravel project using composer, like such:
composer create-project laravel/laravel --prefer-dist
If you want to learn laravel I seriously recommend you use laravel homestead with vagrant.
For this you need to:
Install virtualbox.
Install vagrant.
Install git.
Install ssh.exe (Download msysgit and copy the content of bin folder to git bin folder).
Install Homestead on Vagrant (Follow the steps on laravel/homestead documentation page).
Install Laravel on Homestead (Follow the steps on laravel/installation documentation page).
This method apply to Windows, Linux or Mac, only change the step 4 on linux or mac.