I'm trying to install Laravel 4.1 using the Laravel installer but the docs isn't very descriptive.
Can someone please give a step by step guide on how to do this? I'm completely new to Laravel and PHP frameworks as a whole.
I'm on a Windows 7 machine running WAMP 2.2.
This information/answer isn't quite up to date anymore. The instructions here will install the latest version which is no longer 4.1. For those still wanting to install Laravel 4.1 (despite 4.2+ being out), use the following command.
composer create-project laravel/laravel project_name 4.1
You could replace the 4.1 with 4.0 or 4.2 depending on your situation.
Laravel 4.1 is handy if you aren't in control of your PHP version and you're stuck back on 5.3.7
Laravel 4.2 requires PHP 5.4.
When upgrading a project to a newer version of Laravel, be sure to review the release notes
Installing Laravel means simply downloading Laravel Application bootstrap, which has to be placed in your project directory. That application has a composer.json file, which will, after you run composer install command, download all necessary dependencies (including core framework).
That is one way. Another preferred way is directly through:
composer create-project laravel/laravel project_name
In both cases, you need to have composer installed on your machine. Composer is a modern PHP package manager, which has a ton of benefits (autoloading, custom commands...).
There is really no need for two downvotes, especially when this guy was reading documentation, which he couldn't understand. We were all installing Laravel for the first time.
If you want install laravel via Laravel Installer use this method:
First, open up command line. then enter:
composer global require "laravel/installer=~1.1"
Now go to:
C:\Users\ {User Name} \AppData\Roaming\Composer\vendor
Copy and paste vendor in your destination folder.
Now in your destination folder hold the shift key down and press right click and in opened navigation menu click on "open command window here" then enter command below:
laravel new your_project_destination
Ex:
laravel new laraveltest
Related
I had an old Yii2 project that was built 2+ years ago on version 2.0.12, then left idle since around this time. Today I wanted to re-awaken this project and update it to the latest version
of Yii2 and all dependencies.
Reading the Upgrade notes here I saw that the following command will get me to the latest stable version:
composer require "yiisoft/yii2:~2.0.38" --update-with-dependencies
After this command succeeded I confirmed by running ./yii command in the project root that I am now on 2.0.38, however there are a few things missing. The main README.md remains the same as in version 2.0.12 and there are some files present in a clean build of 2.0.38 that remain missing from the root, e.g. Vagrantfile and docker-compose.yml.
Is there an undocumented step I am missing here to do this cleanly? Surely it's not down to manual intervention to go find/add these missing elements to fully upgrade?
https://laravel.com/docs/5.1#installation
composer global require "laravel/installer"
laravel new blog
ok cool, seems simple
now let's check out how to install 5.2
composer global require "laravel/installer"
laravel new blog
right, exactly the same. I guess the 5.1 installation is actually the 5.2 installation and their docs is buggy. That is, starting from the very very first step, the installation, already wrong.
I hoped I wouldn't have to start that way.
so i guess i need to use the composer install?
Documentation is up-to-date with current state when it was released. Probably nobody will update documentation for old releases unless serious changes were made.
To create Laravel 5.1 project you should use:
composer create-project laravel/laravel name_of_your_project 5.1
And to create Laravel 5.2 project you should use:
composer create-project laravel/laravel name_of_your_project 5.2
php artisan workbench vendor/package --resources
command is not available in laravel 5, but how now create package in laravel 5 ?
Shameless self-promotion, but I've written a post about this called "Creating Laravel 5 packages for dummies" that explains how to create the package, how to put it on GitHub & Packagist and how to push changes/new versions afterwards.
If you're already familiar with creating packages in Laravel 4, the fastest solution I've found was to use this CLI tool.
The laravel workbench has been renamed in laravel 5 to "Package Development" in the documentation
http://laravel.com/docs/master/packages
Notice that there is no longer a workbench command and you need to create your own package structure, as the Laravel creator want to limit the dependency between created packages and the Laravel framework (#ref)
UPDATE: Laravel 5 is now stable and the illuminate/workbench package can be used in a laravel 5 application as I suggested in this post
In Laravel, these are some handy tricks I follow each time I need to create a Laravel package
Solution 1: Get a boilerplate template from https://github.com/cviebrock/laravel5-package-template, and put it under packages/ (follow the instruction in the repo)
Solution 2: Use a packager (with Laravel >= 5.5)
Install packager it as dev dependency > composer require jeroen-g/laravel-packager --dev (check instruction in the repo here)
create the package > composer require jeroen-g/laravel-packager --dev etc, see full tuto
then, we have a choice to keep the package in our project, or just remove it by rollingback composer.json
Hope this is a good update for Laravel lovers ;)
I need to install CakePHP 3 in an old-fashioned upload-unzip-run way.
The archive I've downloaded from cakephp/cakephp/tags does not contain the default folders like webroot, Model etc., which means it's not complete.
The official documentation does not cover this. Here's a relevant Github issue I found, but the person ends up still using Composer.
There's also cakephp/app and it seems to include those missing files, but it's not mentioned in cakephp/cakephp's composer.json, and even if I download it I've no idea how to merge the packages.
Packaged app (cakephp/app) releases that include all dependencies (framework (cakephp/cakephp), standard CakePHP plugins (cakephp/debugkit, cakephp/bake, etc), required third party libraries) can be found on GitHub.
https://github.com/cakephp/cakephp/releases
It's the download with the small package symbol, named like cake-3-x-x.zip.
However, it isn't a good idea to ditch the dependency manager, as keeping the code base and the autoloader up to date will be rather tedious, and, no offense, I have my doubts that you'll be able to handle this properly if you don't even know how to stitch the app and cake packages together.
You can install CakePhp 3 without Composer.
You need minimum requirements to install CakePhp 3 and CakePhp 3 boilerplate ( fresh copy of Cakephp 3 ).
You can download CakePhp 3 boilerplate from github.
Requirements
Server
HTTP Server. For example: Apache. Having mod_rewrite is preferred,but by no means required.
PHP 5.4.16 or greater.
mbstring extension
intl extension
Database :
MySQL (5.1.10 or greater)
PostgreSQL
Microsoft SQL Server (2008 or higher)
SQLite 3
All built-in drivers require PDO. You should make sure you have the correct PDO extensions installed.
CakePhp 3 Boilerplate:
Repository Home
https://github.com/cakephp/cakephp/releases
CakePhp 3.1.4
https://github.com/cakephp/cakephp/releases/download/3.1.4/cakephp-3-1-4.zip
CakePhp 3.0.15
https://github.com/cakephp/cakephp/releases/download/3.0.15/cakephp-3-0-15.zip
Download one repository and unzip where you wanted to install it.
You may get one error like ( you may not get error if you are lucky!)
Fatal Error
Cake\Error\FatalErrorException
Error: Class 'Cake\Mailer\Email' not found
File D:\xampp\htdocs\practice\cakephp\cakephp-3-1-4\config\bootstrap.php
Line: 138
Then you have to comment two line in config/bootstrap.php
//Email::configTransport(Configure::consume('EmailTransport'));
//Email::config(Configure::consume('Email'));
And finally you got CakePhp 3 installed.
[I am also new in CakePhp 3.So Please inform me if there are any wrong in my given process.]
Thanks
Use Composer.
Install Composer locally, follow the Cake installation instructions, then upload the created folders to the target webhost.
Easy, For CakePHP 3.x you can just download the release you want from here
https://github.com/cakephp/cakephp/releases (eg. https://github.com/cakephp/cakephp/releases/tag/3.3.16).
For a complete installation select the first download link (.zip)
the other links are just for the src
Just run this command to get a clone of CakePHP 3.10.0
git clone -b 3.x git://github.com/cakephp/cakephp.git
Try simple steps
1. Download XAMPP Server.
2. Install XAMPP server.
3. Go to ..\xampp\php\php.ini and open.
4. Add this line (extension=php_intl.dll) or if exist uncomment.
5. Download Composer setup from https://github.com/composer/windows-setup/releases/
6. Install composer and give php.exe file in path
7. Open cmd and check now php version using command php -v. if its showing php version its means its working.
8. Now open cmd and cd on xampp\htdocs folder & run command composer create-project --prefer-dist cakephp/app app_name
9. Finished folder created in htdocs.
php artisan workbench vendor/package --resources
command is not available in laravel 5, but how now create package in laravel 5 ?
Shameless self-promotion, but I've written a post about this called "Creating Laravel 5 packages for dummies" that explains how to create the package, how to put it on GitHub & Packagist and how to push changes/new versions afterwards.
If you're already familiar with creating packages in Laravel 4, the fastest solution I've found was to use this CLI tool.
The laravel workbench has been renamed in laravel 5 to "Package Development" in the documentation
http://laravel.com/docs/master/packages
Notice that there is no longer a workbench command and you need to create your own package structure, as the Laravel creator want to limit the dependency between created packages and the Laravel framework (#ref)
UPDATE: Laravel 5 is now stable and the illuminate/workbench package can be used in a laravel 5 application as I suggested in this post
In Laravel, these are some handy tricks I follow each time I need to create a Laravel package
Solution 1: Get a boilerplate template from https://github.com/cviebrock/laravel5-package-template, and put it under packages/ (follow the instruction in the repo)
Solution 2: Use a packager (with Laravel >= 5.5)
Install packager it as dev dependency > composer require jeroen-g/laravel-packager --dev (check instruction in the repo here)
create the package > composer require jeroen-g/laravel-packager --dev etc, see full tuto
then, we have a choice to keep the package in our project, or just remove it by rollingback composer.json
Hope this is a good update for Laravel lovers ;)