Laravel Passport not able to install on laravel 5.4.* - php

Hi I am new to laravel and trying to install the Laravel passport on an existing laravel project. I am trying to run this command
composer require Laravel/passport
When I run the command it shows nothing to install or update. But, I can see that in my composer I have Laravel version ~4.0 and I am using PHP7.1. I have also installed one of its dependency illuminator/encryption=5.4.36.
Can somebody help me out? How to install my Laravel passport?
I am running laravel 5.4.36 (it's locked)
PS: Had to remove composer file content.

You have already installed Laravel Passport. Your composer / console returns that message because its already downloaded.
Your composer.json tells you that you downloaded version 4.0:
"laravel/passport": "~4.0",
Now you just have to move on I recommened going through the documentation.
There is also a nice tutorial from Taylow Otwell regarding Laravel Passport.
https://laracasts.com/series/whats-new-in-laravel-5-3/episodes/13

To get started, install Passport via the Composer package manager:
composer require laravel/passport
Next, register the Passport service provider in the providers array of your config/app.php configuration file:
Laravel\Passport\PassportServiceProvider::class,
then the command line again type:
php artisan migrate
For more info look: https://laravel.com/docs/5.4/passport

Related

problem with laravel 8 : Class 'Illuminate\Support\Facades\RateLimiter' not found [duplicate]

I've created my laravel project as follows:
laravel new my_app
This creates my project using laravel version 8. As I want to use Laravel 7, I modified composer.json:
"laravel/framework": "^7.0",
After that I run:
composer update
which ends with the error described (Class Illuminate\Support\Facades\RateLimiter not found )
In fact, that class doesn't exist in Support facade. Shouldn't downgrade process correct this?
No, this is from code in your application; specifically your App\Providers\RouteServiceProvider. Everything that isn't in vendor is considered your application and is not touched by any upgrade or downgrade. The laravel/laravel package only sets up your application skeleton for you. You can install Laravel 7 specifically with composer create-project --prefer-dist laravel/laravel:^7.0 yourproject; you can find the instructions in the install guide for Laravel 7.
Otherwise you will need to potentially copy the Service Providers from laravel/laravel version 7 into your application so you are not using providers from Laravel 8 as some things have changed and some new features were introduced. And there would be other changes as well.
Laravel 7.x Docs - Installation - via Composer Create-Project composer create-project

How to update Laravel Installer for version 8.x?

I used this command for installing Laravel Installer:
composer global require "laravel/installer"
For creating a project I use :
laravel new name --jet
on 8th September laravel 8.x was released, and I'm looking for installing it using the laravel command but I couldn't do it. Instead, a new laravel project was created with Laravel 7.x. I need some help.
Note: I can create a project with Laravel 8.x with this command, but I need to update my required Laravel and make a project with laravel 8.x and jetstream by using the laravel command:
The Error looks like this.....
It will work
composer create-project --prefer-dist laravel/laravel laravel
composer require laravel/jetstream
php artisan jetstream:install inertia
/home/example_username/.config/composer go to this folder
and edit composer.json
and put
{
"require": {
"laravel/installer": "^4.0"
}
}
then run composer global update
Make sure to update your php version to >7.3 and latest Laravel Installer 4.0.3
composer global require laravel/installer
This might be helpful: https://laravel-news.com/reminder-update-your-laravel-installer
To see what version you have installed run laravel -V in your console
and if it’s less than v4.0 you’ll need to update, and we have a
tutorial on doing it, but typically it’s just a matter of running:
composer global require "laravel/installer:^4.0"

Could not find package /laravel/laravel with stability stable

Could not find package /laravel/laravel with stability stable.
So I've got that error when I tried to create new laravel project with the following command:
composer create-project --prefer-dist /laravel/laravel project
And if I try just laravel new project, I get:
laravel: command not found
However laravel is installed, and if I move to its installation folder (which is ~/.config/composer/vendor/laravel/installer), and I type:
php laravel new project
Then it works but I get bunch of * suggests installing *. For example:
laravel/framework suggests installing symfony/psr-http-message-bridge (Required to use psr7 bridging features (0.2.*).)
symfony/routing suggests installing symfony/expression-language (For using expression matching)
psy/psysh suggests installing hoa/console (A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit.)
And many more.
I'm on Linux Mint Cinnamon 64-bit, and LAMP.
Everything you need is covered in Laravel's extensive documentation.
Via Composer Create-Project
Alternatively, you may also install Laravel by issuing the Composer
create-project command in your terminal:
composer create-project --prefer-dist laravel/laravel blog
Note that there is no preceding slash in laravel/laravel.
For the installer to work, again you can refer to the documentation:
Via Laravel Installer
First, download the Laravel installer using Composer:
composer global require "laravel/installer" Make sure to place the
$HOME/.composer/vendor/bin directory (or the equivalent directory for
your OS) in your $PATH so the laravel executable can be located by
your system.
Once installed, the laravel new command will create a fresh Laravel
installation in the directory you specify. For instance, laravel new
blog will create a directory named blog containing a fresh Laravel
installation with all of Laravel's dependencies already installed:
laravel new blog
You can read more about changing your $PATH variable here

How to install aimeos in laravel 5.1?

I am new with laravel. I have no idea how to install aimeos in laravel 5.1, since the installation guide for laravel 5.0, there is a different service provider in between L5 and L5.1.
I got this error:
C:\xampp\htdocs\classic>composer require aimeos/aimeos-laravel
Using version ^1.0 for aimeos/aimeos-laravel
./composer.json has been updated
[Symfony\Component\Debug\Exception\FatalErrorException]
Class 'Aimeos\Shop\ShopServiceProvider' not found
Script php artisan clear-compiled handling the pre-update-cmd event returned with an error
Please help me.
There's no difference between Laravel 5.0 and 5.1 when installing the Aimeos web shop package:
https://aimeos.org/docs/Laravel/Install_Aimeos
Update:
There seems to be a problem due to a recent change in Laravel 5.1.x because the service provider is now used before composer installs the package. I've fixed this in my test installation by
removing the the provider from config/app.php
removing the Aimeos related artisan commands in the "scripts" section of the composer.json file
running "composer update" afterwards with the aimeos-laravel package as requirement
executing the artisan tasks ("vendor:publish", "migrate", "aimeos:setup", "aimeos:cache") afterwards by hand
Download https://github.com/aimeos/aimeos-laravel.
place package to root or desired folder and while updating the composer set
"require": {
.......
"laravel/framework": "^5.1.11",
......
}
then brows
https://aimeos.org/docs/Laravel/Install_Aimeos#Laravel_5.0.2F5.1_and_Aimeos_1.0 Link and follow the instructions.

Laravel 4 Package installation using composer

I need to know how to install packages in laravel 4.
I have downloaded a bundle from github, but executing the bundle, I see it is deprecated in Laravel 4. Can anyone please help me.
Just using packagist, you can go to packagist.org , after that just put the package name at require key in your composer.json on your laravel project, and that run this command , composer update or compose install
in example :
// composer.json
"require": {
// default value..
"intervention/image": "dev-master",
}
i hope this help
Laravel 4 now uses composer to install packages.
You can add new packages to laravel via a few options on composer. One is on the command line.
> composer require author/package
> dev-master
After issuing the require command it will ask you what version to use. then run composer update, add the PackageServiceProvider to your app/config/app.php
First and always if you plan to use composer in your work, learn the basics of it (what is composer.json,composer.lock...)
There is excellent video on Laracasts https://laracasts.com/lessons/you-must-use-composer
That way you can avoid problems and enjoy using this great package manager.
Next use composer dump(-autoload) command frequently and composer self-update.
If that bundle is deprecated in Laravel4 than it is deprecated and you can't use it ( unless author made some changes and adopt it for l4 )
Also bundle is a l3 specific type and in l4 we have packages.
Ok, you can't execute composer commands on windows command prompt. mac/linux terminal would do but if you insist on using windows then install this [https://www.cygwin.com/] so you could issue unix commands

Categories