Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I just wanted to ask if anyone knows why the scaffolding section isn't available in Laravel 8.x.
Recently I've tried the php artisan ui react but it didn't work.
And when I've tried it with the 7.x it worked fine.
Is Laravel dropping the support for that in 8.x or is it an upcoming feature or it has been changed to another method, thank you in advance.
Link to the documentation page here
From laravel 6 to 7 upgrade notes: https://laravel.com/docs/7.x/upgrade
All authentication scaffolding has been moved to the laravel/ui repository. If you are using Laravel's authentication scaffolding, you should install the ^2.0 release of this package and the package should be installed in all environments. If you were previously including this package in the require-dev portion of your application's composer.json file, you should move it to the require section:
composer require laravel/ui "^2.0"
Did you run the command above before running php artisan ui?
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed last month.
Improve this question
I'm triying to create a new symfony project for class work and when I try to run the command to create it:
composer create-project symfony/skeleton:"^5.4" 2023-truiter-symfony
Gives me the next error:
symfony error
My PHP version is 8.1.12 and my composer version is 2.5.1
I've been trying to create a new symfony project without specifying the version and it works, but I would like that when the project is created it has the version ^5.4
Finally I have found a solution to the problem, I have installed CLI Symfony following the instructions from:
https://symfony.com/download
Once installed the problem when creating the project with the "^5.4" version has been solved.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
I am needing to install a package into my Laravel project. I am using the latest version of Laravel (8), It comes preinstalled with;
"guzzlehttp/guzzle": "^7.0.1"
When I go to install the new package, I get an error saying that it is not compatible with my project. When I check the composer.json file for the package, it give the following as a dependency;
"guzzlehttp/guzzle": "~6.0"
I need this package to continue with my project. What would be the best way to deal with this?
Laravel v8 requires Guzzle v7. It is not compatible with Guzzle v6. If any package you want to use does not yet support Guzzle v7, you cannot use that package in your Laravel project - unless you downgrade Laravel to v7.
Updating the package from Guzzle v6 to v7 might not be that easy, as the list of breaking changes is not that short. But the maintainer of the package you want to use is surely pretty thankful if you provide a pull request to his repository
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I want to solve a kata using PHP and test driven development. I would like to use a generator or template to base on a minimal composer project with phpunit.
The minimal project should contain:
the composer.json with phpunit as require-dev
the vendor folder
a sample tests folder with a test file and a source file
I wondered how other developers do that in PHP and found so far the following options:
use PHPStorm and create a new composer project based on laravel/laravel followed by php artisan key:generate as described here and here
use composer init as described in this post
use php-pds/skeleton followed by composer require phpunit/phpunit --dev as described here
What is typical way for a PHP developer to deal with the initial boilerplate in a small php project?
I can offer you my approach as a reference:
I have a skeleton in PHP with composer and PHPUnit with a class and its test already set up. When I want to challenge a new kata, I just create a new kata and duplicate the skeleton in it (https://docs.github.com/en/free-pro-team#latest/github/creating-cloning-and-archiving-repositories/duplicating-a-repository), then updates readme and class names to reflect the kata. Usually, I use master as the reference for the kata to start, and each attempt is a new branch from master.
Here is the link to my repo as a reference, you can use it as a template :)
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I am using composer to install php packages. All packages are installed in Vendor folder. Some kind of package are easy to use in laravel but their are many php 3rd party package. Sometimes I need them to use in my laravel package.
My question is. How can I call php package from vendor folder to my laravel controller? If I can call them then I can use them. So I don't know how to call in laravel. But on my Row PHP project I can call them using autoloader.php But i don't understand how to call in laravel.
So please help me to use 3rd party php package/library in laravel.
If the package is inside the Vendor folder then in your controller function, call like this
$client = new \Package\Name\Class;
or
use Package\Name\Class;
$client = new Class;
Here is another reference
How can I use a class from vendor folder in laravel project
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
How to work with non laravel packages as i want to use https://packagist.org/packages/kerphi/phpfreechat this packages
You can use the simple composer functionality. Via commandline run:
composer require kerphi/phpfreechat
That's it the package classes should now be available within your application.
You can view the complete documentation on loading packagist dependancies on the composer website.
update
You won't be able to use this package as the package requires the slim framework. You can see this on the package github page: https://github.com/kerphi/phpfreechat and the index file called during javascript usage: https://github.com/stmolivier/phpfreechat/blob/master/server/index.php
If you are using windows then In cmd go to your project location and run this code
composer require kerphi/phpfreechat