I use docker (sail) and I will use Breeze and I do everything was into the documentation
sail require laravel/breeze --dev
sail artisan breeze:install react
sail npm install
sail npm run dev
Everything was ok until I put sail npm run dev command becouse it display me error like in title of this post
LARAVEL v9.21.6 plugin v0.5.2
I don't know what plugins are involved. How can I solve this problem?
#Update
> dev
> vite
VITE v3.0.3 ready in 459 ms
➜ Local: http://localhost:5173/
➜ Network: http://IP:5173/
LARAVEL v9.21.6 plugin v0.5.2
➜ APP_URL: http://hello.test
But I can't after run command
sail npm run watch
Can you try clear all cache;
php artisan optimize:clear
After that enter maintenance mode;
php artisan down
Than publish again;
php artisan up
Related
I have a big problem. I tried to use Tailwind in a new Laravel project following exactly all the documentation but as soon as I try to put the <link> to the css/app.css the HTML just stop working in the browser (localhost).
I tried also starting a new Laravel project with JetStream, but it does the same thing.
I also tried installing an older version of Tailwind but nothing seems to work.
I don't really know what to search for at this point.
Any help?
you can use tailwindCss in laravel with breeze package or Jetstream
1- with Breeze:
//composer package
composer require laravel/breeze --dev
then
php artisan breeze:install
Or Breeze with Inertia
php artisan breeze:install --inertia
Finalizing The Installation
npm install
npm run dev
php artisan migrate
2- with Jetstream
//composer package
composer require laravel/jetstream
Install Jetstream With Livewire
php artisan jetstream:install livewire
php artisan jetstream:install livewire --teams
Or, Install Jetstream With Inertia
php artisan jetstream:install inertia
php artisan jetstream:install inertia --teams
Finalizing The Installation
npm install
npm run dev
php artisan migrate
on my project i run the following command for auth in laravel 7.1:
$ composer require laravel/ui
$ php artisan ui vue --auth
while I try to access to my project
127.0.0.1:8000/login
I got login page without any template
If you use the laravel/ui package with the Vue scaffold you also need to run:
npm install && npm run dev
to install the js dependencies and compile the Vue assets correctly.
I have a problem when creating login/auth in Laravel 6. I typed "make: auth" in the terminal and I get an error "Command" make: auth "appears not defined." Is there a solution for this?
Looks like L6 moves the Auth scaffolding into a separate package.
https://laravel.com/docs/6.0/authentication
Want to get started fast? Install the laravel/ui Composer package and run php artisan ui vue --auth in a fresh Laravel application.
Laravel 9.x Starter Kits
Laravel Breeze
composer require laravel/breeze --dev
php artisan breeze:install
Breeze & React / Vue
php artisan breeze:install vue
Or...
php artisan breeze:install react
php artisan migrate
npm install
npm run dev
Laravel 8.x
This command will create a new application with all of the authentication scaffolding compiled and installed:
laravel new kitetail --jet
Laravel's laravel/jetstream package provides a quick way to scaffold all of the routes and views you need for authentication using a few simple commands:
composer require laravel/jetstream
// Install Jetstream with the Livewire stack...
php artisan jetstream:install livewire
// Install Jetstream with the Inertia stack...
php artisan jetstream:install inertia
Github : laravel /jetstream
Official Documentation : Laravel Jetstream Documentation
Laravel 7.x
composer require laravel/ui --dev
php artisan ui vue --auth
Laravel 6.x
Laravel's laravel/ui package provides a quick way to scaffold all of the routes and views you need for authentication using a few simple commands:
composer require laravel/ui "^1.0" --dev
php artisan ui vue --auth
After above commands, you'll get following output :-
Vue scaffolding installed successfully.
Please run "npm install && npm run dev" to compile your fresh scaffolding.
Authentication scaffolding generated successfully.
Now after running this command run this command, for Vue scaffolding
npm install && npm run dev
If you're get following error message
npm ERR! Your cache folder contains root-owned files, due to a bug in
npm ERR! previous versions of npm which has since been addressed.
npm ERR!
npm ERR! To permanently fix this problem, please run:
npm ERR! sudo chown -R 1000:1000 "/home/shiv/.npm"
npm ERR! code EACCES
npm ERR! syscall open
Then give permission user to access .npm files from system
sudo chown -R 1000:1000 "/home/system_user_name/.npm"
As i now understood clearly,running "sudo command is dangerous for npm configurations"
Please look it this threat for more clear understanding :-
How to fix npm throwing error without sudo
One major change introduced in Laravel 6.0 is the removal of php artisan make:auth Command
Basically, make:auth command was used to create the authentication scaffolding. The concept has not been removed, but the way of implementation has been changed
Update for Laravel 6: The New Way
Authentication support is now added with the help of a package now (More details)
The command to implement Auth is as follows:
composer require laravel/ui
php artisan ui vue --auth
This command will install a layout view, registration and login views, as well as routes for all authentication end-points. A HomeController will also be generated to handle post-login requests to your application's dashboard.
NOTE: If your Login and Register page only shows plain HTML. And CSS is not loading properly then run this two command:
npm install
npm run dev
In Laravel 6.0 make:auth no longer exists. Read more here
1 - First do this:
composer require laravel/ui
Note:
Laravel UI Composer package is a new first-party package that extracts the UI portion of a Laravel project ( frontend scaffolding typically provided with previous releases of Laravel ) into a separate laravel/ui package.
The separate package enables the Laravel team to update, develop and version UI scaffolding package separately from the primary framework and the main Laravel codebase.
2 - Then do this:
php artisan ui:auth
instead of
php artisan make:auth ( which works for Laravel 5.8 and older versions )
It will generate the auth routes, a HomeController, auth views, and a app.blade.php layout file.
You can also generate the views only with:
php artisan ui:auth --views
The console command will prompt you to confirm overwriting auth files if you've already run the command before.
More Options here
// Generate basic scaffolding...
php artisan ui vue
php artisan ui react
and also:
// Generate login / registration scaffolding...
php artisan ui vue --auth
php artisan ui react --auth
composer require laravel/ui
php artisan ui bootstrap --auth
npm install
npm run dev
if you are using laravel 6, then try this command because with this command 'composer require laravel/ui' you will get only for Laravel 7.0 version and up,
composer require laravel/ui "^1.0" --dev
After Install the laravel/ui using via Composer run below command for auth scaffolding package,If Using vue then use below one,
php artisan ui vue --auth
If using bootstrap then use below one,
php artisan ui bootstrap --auth
in a fresh Laravel application or with use of the documentation.
Laravel verion 6.0
composer require laravel/ui
php artisan ui vue --auth
these commands will help
you can copy the composer.json file and the app/Exceptions/Handler.php files from the official laravel 7 repo.
link to repo: https://github.com/laravel/laravel
Then run
composer update
composer require laravel/ui "^2.0"
php artisan ui vue --auth
composer require laravel/ui
php artisan ui bootstrap --auth
npm install --global cross-env
npm install --no-bin-links
npm run dev
I start a new project in laravel but my composer installed a fresh version of laravel 6.0.1.
Php artisan make:auth command can't work.
I try many times but error can't remove
composer require laravel/ui
installed but
when I use the second command:
php artisan ui vue --auth
then system show me this message:
Command "ui" is not defined.
Using version ^1.0 for laravel/ui
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 4096 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/RuleSetGenerator.php on line 129
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 4096 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/RuleSetGenerator.php on line 129
Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.
you can try this:
C:\Whatever\Your_project_name>composer require laravel/ui
and
C:\Whatever\Your_project_name>php artisan ui vue --auth
Just this two inside your project folder.I am using vue but you can try other ones too.
Did you install the dependency? To run that command you need to install an additional package:
composer require laravel/ui
After this you should be able to run one of these commands:
php artisan ui bootstrap
php artisan ui vue
php artisan ui react
In case you need the auth views, you could:
php artisan ui bootstrap --auth
php artisan ui vue --auth
php artisan ui react --auth
Don't forget to run this after:
npm install
The same error hits me in the new version of Laravel 7.x, What I did the process is really simple: if your composer is old version and the terminal or cmd is giving you warnings to update it using some package then there are chances that the above error hits you.
Solution:
Step 1 : Try the following two commands in your normal terminal not of your project directory. The below command will only update the composer.
composer self-update
OR use the below command (it will update your dependencies plus your composer)
composer update
When you composer gets updated. check the composer by the below command
composer --version
Step 2 : First go to your project root folder C:\Whatever\Your_project_name>
composer require laravel/ui
Try any of the below command according to your front end framework.
php artisan ui vue --auth
php artisan ui bootstrap --auth
php artisan ui react --auth
At the end don't forget to run
npm install
If your User Interface is not working properly try below command.
npm run production
run "composer require laravel/ui 1" instead of "composer require laravel/ui"
laravel 6 works with version 1.0, it written in docs "Want to get started fast? Install the laravel/ui (1.0)"
I was facing the same issue is laravel 8.0, whenever i tried to run this command
php artisan ui vue -auth
after installing the laravel/ui package I was getting the error
command UI is not defined
I fixed this issue by using this command
composer update
it automatically install the laravel/ui package into my project and then I run this command to install the required auth for my web app.
`php artisan ui vue -auth`
You need to create another new project.
You can try this:
composer config -g repo.packagist composer https://packagist.phpcomposer.com
composer create-project --prefer-dist laravel/laravel project2 "7.0.*"
composer require laravel/ui
php artisan ui vue --auth
Just add the version in command line as well:
composer require laravel/ui "^1.0" --dev
Check this too.
using
composer require laravel/ui:*
worked for me
I recently faced this issue after upgrading from laravel 6 to 8. Installing laravel/ui did not work for me because the package was already installed.
I solved it by manually deleting cache folder at bootstrap/cache
I have just added the tests with Laravel Dusk.
Everything works if I test on my pc. I thus set up a travis.yml file :
language: php
sudo: required
dist: trusty
php:
- 7.1
- 7.2
addons:
chrome: stable
services:
- mysql
install:
- cp .env.travis .env
- mysql -e 'create database homestead_test;'
- travis_retry composer self-update
- travis_retry composer install --no-interaction
- php artisan key:generate
- php artisan migrate:fresh --seed
before_script:
- google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost &
- php artisan serve &
script:
- php artisan code:analyse --level=7
- php artisan dusk
- vendor/bin/phpunit
notifications:
email: false
However, when I push on Github I obtains errors : show travis errors
I does not understand to make how so that my tests work on travis.
Would anybody know how to help me on this point? Best Regards, Quentin
Update :
The exact commit on github
The issue is SESSION_DRIVER=array in your .env.travis file, change it to SESSION_DRIVER=file.
The login tests aren't working because the sessions vanish after each request.