I am having troubles installing Laravel with the AdminLTE onto my local XAMPP server. I am trying to install this package:
https://learninglaravel.net/adminlte-template-laravel-5-package
here which requires me to install latest laravel
The install is done via composer with the following command:
composer global require "acacha/adminlte-laravel-installer=~2.0"
This seems to work fine.
The problem occurs when trying to create my new project via
laravel new laravel-with-admin-lte
which returns a
laravel is not recognized as an internal or external command.
Naturally I had a look at my Windows 10 Environment Variables and found that Path is correctly defined as: %USERPROFILE%\AppData\Local\Microsoft\WindowsApps;C:\Users\MyUsername\AppData\Roaming\Composer\vendor\bin.
Inside the \vendor\bin directory I see this:
If I rename those two files to laravel only, and then run the laravel new command, I receive a command "new" is not defined error.
No clue anymore what to do, can someone help please?
Thanks,
A2k
Related
I am trying to clone a Laravel project into VSCode and run the project on a local server. I have imported Remote - WSL, but it won't let me set up a composer. I get: this error message when using php command in the terminal
I don't know what to do from here. Is there any other way to simply clone a project?
A popular option is to use a pre-configured program like MAMP / WAMP / XAMP which gives you the stack you need to run php code locally.
Alternatively you can set up you local environment for php and solve the error you are getting...
The error suggests you need to install php globally on your system :
https://www.php.net/manual/en/install.windows.php
https://www.php.net/manual/en/install.macosx.php
And to install composer:
https://www.hostinger.co.uk/tutorials/how-to-install-composer
I have a new laptop and I'm trying to install Laravel via composer.
I usually use PhpStorm wizard to create new projects.
For some reason it keeps failing to install Laravel on my new device, I've installed PHP via wamp and git and composer.
I've no idea what is wrong.
Here is my PHP & git
What you should do is remove your composer directory and run composer install again.
I saw that your autoload failed to load which can cause this issue.
This is probably because you changed the directories.
I transferred my cakephp api from linux vps to azure cloud. I configured redirects too but I am getting "Trait 'Crud\Controller\ControllerTrait' not found" error. I checked the bootstrap.php file to check whether its loading crud plugin or not. It does.
Do I need to run composer autoload to load the plugin? If yes then how to in azure as its windows vm.
Frist, you should check whether the folder named friendsofcake exists in \vendor directory or not. If not, you need to run the following command to install it by using composer:
composer require friendsofcake/crud:^4.3
Refer to this doc for more details.
I realised that my code base was created using composer version 1.
and to install all packages I had to run
composer install
However, not all plugins where loaded correctly. If you have composer version 2
installed and facing the issues
kindly run
composer update
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.
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