laravel-frontend-presets / tall Goto Github PK
View Code? Open in Web Editor NEWA TALL (Tailwind CSS, Alpine.js, Laravel and Livewire) Preset for Laravel
License: MIT License
A TALL (Tailwind CSS, Alpine.js, Laravel and Livewire) Preset for Laravel
License: MIT License
How do you change the auth on registration to allow for first and last name, rather Only name?
Really new to Livewire. Appreciate any help.
Get the followinf Error:
Unable to set component data. Public property [$last_name] not found on component: [auth.register]
vendor\livewire\livewire\src\ComponentConcerns\HandlesActions.php:30
Hi,
I am developing a project with Laravel 7 and decided to upgrade it to Livewire 2. Then I realized my current TALL stack didn't have the route modifications (Route::livewire
-> Route::get
) and I decided to upgrade it too. Then I couldn't. Because It has Illuminate\Support:^8.0
as a dependency, and I have ^7.0. Should I upgrade framework too to use LW2? (I hope it has a easier solution)
BTW, Livewire 2 has "illuminate/support": "^7.0|^8.0",
in it's composer.json
. Do you have anything special which only contains in Laravel 8?
Thanks.
I've checked the docs and tried some hacks as well, but still, I couldn't figure out a way to protect the dashboard with verify
email methods.
In laravel/ui preset we achieve this with Auth::routes(['verify' => true]);
. But I am not sure how to obtain this behaviour with the routes registered with the tall preset.
Is there any workaround for this?
Installed fresh laravel 8
installed TALL stack with --auth
To demonstrate issue:
added route/view hola with simple form - shows outline on input in chrome
added route/view hola2 with same form using boilerplate html and <style> tags for "outline:0" - no outline on inputs
github link to file: https://github.com/azc666/hola
I noticed that everything is hardcoded text. I'm going to open a pull request with proper auth texts soon.
I set up my app on Macbook then , pulled it onto my Mac using git.
I get this error...
file_get_contents(/Users/mikeyrab/Sites/.../vendor/livewire/livewire/src/../dist/manifest.json): failed to open stream: No such file or directory (View: /Users/mikeyrab/Sites/.../resources/views/layouts/base.blade.php)2
The entire dist folder is missing.
I tried running npm installl && npm run dev
but had no effect ¯_(ツ)_/¯
Is there some thing I am doing wrong?
requires VITE integration to work again .
I installed PHP 8 and received the following error during composer update.
Problem 1
- Root composer.json requires laravel-frontend-presets/tall ^2.1.1 -> satisfiable by laravel-frontend-presets/tall[v2.1.1].
- laravel-frontend-presets/tall v2.1.1 requires php ^7.2.5 -> your php version (8.0.0) does not satisfy that requirement.
Hi
Just did a fresh laravel installation and then followed the installation of this preset, and when I try access the site I got this:
Route [home] not defined. (View: /home/vagrant/code/tall/resources/views/welcome.blade.php)
Did I miss something?
Got the follow errors recently when I tried npm update. I'm on npm 7.0.10
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: undefined@undefined
npm ERR! Found: [email protected]
npm ERR! node_modules/laravel-mix
npm ERR! dev laravel-mix@"^5.0.7" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer laravel-mix@"^2.1.7" from [email protected]
npm ERR! node_modules/laravel-mix-tailwind
npm ERR! dev laravel-mix-tailwind@"^0.1.1" from the root project
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
This is just to flag livewire/livewire#1635 for a regression in how Livewire 2.2.4 handles validation rules, in case anybody hits it with a new app.
It means that, out of the box, the registration test will fail as Livewire no longer passes the passwordConfirmation
property to the validation rules unless explicitly keyed in the rules.
The current userland workaround would be to update the validation rule:
$this->validate([
'name' => ['required'],
'email' => ['required', 'email', 'unique:users'],
- 'password' => ['required', 'min:8', 'same:passwordConfirmation'],
+ 'password' => ['required', 'min:8'],
+ 'passwordConfirmation' => ['same:password'],
]);
❯ npm install && npm run dev
npm WARN @tailwindcss/[email protected] requires a peer of tailwindcss@^1.2.0 but none is installed. You must install peer dependencies yourself.
I had tonpm install tailwindcss
first. Then the npm run dev ran fine.
A visual clue would be helpful while livewire is doing something in the background.
I recommend the tailwind spinner plugin for this purpose.
I'd be willed to create a PR if any of the maintainers (I assume @imliam and @danharrin) approve the usage of an additional tailwind plugin.
There seems to be a problem with the laravel-mix-tailwind package, which in turn also prevents the mix manifest from being generated.
ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: undefined@undefined
npm ERR! Found: [email protected]
npm ERR! node_modules/laravel-mix
npm ERR! dev laravel-mix@"^5.0.7" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer laravel-mix@"^2.1.7" from [email protected]
npm ERR! node_modules/laravel-mix-tailwind
npm ERR! laravel-mix-tailwind@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/quentin/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/quentin/.npm/_logs/2020-11-05T10_24_54_803Z-debug.log
Not sure how to work around this.
This package installs Tailwind v.2. Needs to be updated to v.3
https://dnschecker.org/#A/tallstack.dev
DNS Record seems to be MIA.
After a fresh install using the command:
composer require livewire/livewire laravel-frontend-presets/tall
I can't run the command:
php artisan ui tall
because I get Could not open input file: artisan
Previously I was able to do it (its not the first time I us TALL)
Any plans to upgrade Tailwind to v2.0 (deprecating @tailwindcss/ui) for new laravel-frontend-presets/tall projects?
Hi. How can I use this in Auth\Login? I can not find this method.
protected function authenticated(Request $request, $user)
{
$user->update([
'last_login_at' => Carbon::now()->toDateTimeString(),
'last_login_ip' => $request->getClientIp()
]);
}
Hi
Thanks for this package.
I would like to redirect to the previous page when a user login or register just like mentioned in this article:
how can it be implemented using livewire in the login/register?
I see that this has you install the laravel ui package which the laravel 9 docs say has been replaced by jetstream. I am using laravel 9 and jetstream, will this package cause conflicts?
Problem 1
- illuminate/support[v8.0.0, ..., v8.11.2] require php ^7.3 -> your php version (8.1.2) does not satisfy that requirement.
- Root composer.json requires laravel-frontend-presets/tall 4.0.0 -> satisfiable by laravel-frontend-presets/tall[v4.0.0].
- [...]
- laravel-frontend-presets/tall v4.0.0 requires illuminate/support ^8.0 -> satisfiable by illuminate/support[v8.0.0, ..., 8.x-dev].
- Only one of these can be installed: illuminate/support[v5.6.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev, v9.0.0-beta.1, ..., 9.x-dev], laravel/framework[v9.0.0-beta.1, ..., 9.x-dev]. laravel/framework replaces illuminate/support and thus cannot coexist with it
Commenting out:
"laravel-frontend-presets/tall": "4.0.0"
Resolves the issue, as in composer updates fine, but then the app stops working, of course.
Solution:
Update dependency to Illuminate/Support 9?
Hi,
I'm new in Laravel. I test laravel 8 with TALL.
I've a problem : Livewire.js is not in the good place.
the console : vendor/livewire/livewire.js?id=......
my repo : vendor/livewire/livewire/dist/livewire.js
I copied the content of dist/ in vendor/livewire
not enought for work
so, I added a file livewire.php (see in a post) in config/
but now, a message while I use a component : The requested URL /PROJECT/livewire/message/search was not found on this server.
indeed, I've no repo in app/http/livewire
Someone for help me ?
I think it would be a nice idea to take some screenshots of the important pages in an application that uses this preset and upload them when a pull request is opened so that we can quickly see what things look like.
If we wanted, we could probably do videos as well since GH nows support MP4 files on issues / PRs.
Hi.
I don't know why but full-page component route just not working.
use App\Http\Livewire\Search;
Route::get('search', Search::class)
->name('search');
component path
app/Http/Livewire/Search.php
Search.php
namespace App\Http\Livewire;
use Livewire\Component;
class Search extends Component
{
public function render()
{
return view('livewire.search')
->extends('layouts.auth');
}
}
and view path
resources/views/livewire/search.blade.php
php artisan serve
127.0.0.1:8000/search
and just 404 Not found.
When i run "npm install && npm run dev" i get below warnings and errors:
vagrant@homestead:~/code/teamsy$ npm install && npm run dev
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/watchpack/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN [email protected] requires a peer of laravel-mix@^2.1.7 but none is installed. You must install peer dependencies yourself.
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /home/vagrant/code/teamsy/node_modules/webpack-dev-server/node_modules/ansi-regex/package.json.3885035533
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/home/vagrant/code/teamsy/node_modules/webpack-dev-server/node_modules/ansi-regex/package.json.3885035533'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /home/vagrant/.npm/_logs/2020-11-25T13_55_39_251Z-debug.log
And the application fails with error:
"The Mix manifest does not exist"
I updated all packages in my Laravel and it's still Tailwind 2.
I even did php artisan ui tall and it's still the same.
It is not upgrading to Tailwind v.3
Originally posted by @core45 in #108 (comment)
Fresh Laravel v8.5.7
installation on MacOs Big Sur and using ^2.2
of the TALL preset.
laravel new my-app
or curl -s https://laravel.build/my-app | bash
composer require livewire/livewire laravel-frontend-presets/tall
php artisan ui tall --auth
npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: undefined@undefined
npm ERR! Found: [email protected]
npm ERR! node_modules/laravel-mix
npm ERR! dev laravel-mix@"^6.0.6" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer laravel-mix@"^2.1.7" from [email protected]
npm ERR! node_modules/laravel-mix-tailwind
npm ERR! dev laravel-mix-tailwind@"^0.1.0" from the root project
npm install --force
works but ideally should not error and Tailwind 2.0 should now be the standard..
Hi,
i have an Repo:
https://github.com/homeoftheunits/tall-problem/tree/dev
This runs actually local end creates two Buttons. This Buttons should toggle an model between 1 and 2. But it doesn't work, when i click on the Button there is no effekt. When i debug the Problem, i see there is noch Request to livewire.
What is here wrong? Maybe an wrong package?
Cheers
Ralf
Although the package itself doesn't have tests - the stubs do. We could make sure these work by having a GitHub action run laravel new
or composer create-project
with multiple versions of PHP/Laravel, then run the preset command and run the tests.
This would help give us confidence in the versions that the package currently supports, and any changes we make, without needing to run them manually.
Hello,
Thank you for this package which looks interesting.
I followed all the installation steps but there seems to be a problem with the rendering when I run php artisan serve
. I didn't make any other extra modifications ...
I've never used Tailwind so do I have to do something special to get the rendering right ?
Thanks a lot for this inappropriate / incongruous issue
im trying to add the alpine-clipboard plugin to the project that I use TALL in and I have to add it before the alpine starts/loads to avoid the declaring errors in the console but since there is no alpine imports and property declare in the app.js, I'm not really sure how to do that. anyone who can help would be much appreciated.
currently by just adding the import Clipboard from "@ryangjchandler/alpine-clipboard"
and Alpine.plugin(Clipboard)
I get the following error in the console:
Uncaught (in promise) ReferenceError: $clipboard is not defined
at eval (eval at generateFunctionFromString (module.esm.js:1)
Password managers fill both the email and password at the same time. It causes odd behaviour on desktop (flickering) and on iOS it causes the password filling to be completely broken. I have added some more detail on the livewire repo (livewire/livewire#943).
The issue above does not use this preset, but I have since tried it and have the same issues.
I believe the core issue is that we are data binding the email/password via livewire but actually we only really need to send the data with the form submit.
At present, the login and register Livewire components are fully tested.
However, while I've verified that the rest of the auth works manually, it's not under automated tests. We could do with a few more feature tests to get more confidence in such fundamental parts of the preset.
Would you accept a PR that adds a {{ $slot }}
in the app.blade.php
file so you could easily use Full Page Components out of the box?
I installed totally fresh Laravel 8
laravel install test
Then I installed this package as described in the read.me and it's still the same. It installs Tailwind v.2 instead of v.3
Many solutions of laravel are not accessible if you are using this preset (including security features).
For example the concern AuthenticatesUsers.
It ships with throttling login attempts and choosing a custom username()
instead of only email
.
Maybe the concerns should be added but then this preset or better laravel/ui
cannot be uninstalled because the concerns are implemented there.
So the users table populates with the column email_vereified_at, but doesn't appear to be enabled within this by default? What's the best way to set that up? Does some of it already exist and is just not enabled? Thanks!
getting this issue after a fresh install and installing auth
Would you be interested in a --pest
option which would convert the existing PHPUnit test suite to Pest tests?
I'm converting it on my project anyway, and it would be ideal if the work could be reused by others.
This package currently doesn't work with v2 of Livewire so a new major version will be needed since breaking changes are involved.
Just tried a fresh install with the present and am encountering the following error upon 'npm run dev'
Never encountered this before. I have installed the preset several times successfully.
Any help would be greatly appreciated. :)
Seems like it might be a webpack issue. Not sure.
Error: Package exports for '/Users/[redacted]/Dev/DisclosuresReader/node_modules/kleur' do not define a valid './colors' target
full error:
Error: Package exports for '/Users/[redacted]/Dev/DisclosuresReader/node_modules/kleur' do not define a valid './colors' target
at resolveExportsTarget (internal/modules/cjs/loader.js:607:9)
at applyExports (internal/modules/cjs/loader.js:492:14)
at resolveExports (internal/modules/cjs/loader.js:541:12)
at Function.Module._findPath (internal/modules/cjs/loader.js:643:22)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:941:27)
at Function.Module._load (internal/modules/cjs/loader.js:847:27)
at Module.require (internal/modules/cjs/loader.js:1016:19)
at require (/Users/[redacted]/Dev/DisclosuresReader/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
at Object. (/Users/[redacted]/Dev/DisclosuresReader/node_modules/autoprefixer/lib/autoprefixer.js:9:13)
at Module._compile (/Users/[redacted]/Dev/DisclosuresReader/node_modules/v8-compile-cache/v8-compile-cache.js:194:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1160:10)
at Module.load (internal/modules/cjs/loader.js:976:32)
at Function.Module._load (internal/modules/cjs/loader.js:884:14)
at Module.require (internal/modules/cjs/loader.js:1016:19)
at require (/Users/[redacted]/Dev/DisclosuresReader/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
at /Users/[redacted]/Dev/DisclosuresReader/node_modules/laravel-mix/src/components/Preprocessor.js:62:41
at /Users/[redacted]/Dev/DisclosuresReader/node_modules/laravel-mix/src/components/Preprocessor.js:69:31
at global.tap (/Users/[redacted]/Dev/DisclosuresReader/node_modules/laravel-mix/src/helpers.js:10:5)
at /Users/[redacted]/Dev/DisclosuresReader/node_modules/laravel-mix/src/components/Preprocessor.js:27:13
at Array.forEach ()
at Sass.webpackRules (/Users/[redacted]/Dev/DisclosuresReader/node_modules/laravel-mix/src/components/Preprocessor.js:22:22)
at ComponentFactory.applyRules (/Users/[redacted]/Dev/DisclosuresReader/node_modules/laravel-mix/src/components/ComponentFactory.js:155:23)
at /Users/[redacted]/Dev/DisclosuresReader/node_modules/laravel-mix/src/components/ComponentFactory.js:66:48
at /Users/[redacted]/Dev/DisclosuresReader/node_modules/laravel-mix/src/Dispatcher.js:34:47
at Array.forEach ()
at Dispatcher.fire (/Users/[redacted]/Dev/DisclosuresReader/node_modules/laravel-mix/src/Dispatcher.js:34:28)
at Mix.dispatch (/Users/[redacted]/Dev/DisclosuresReader/node_modules/laravel-mix/src/Mix.js:118:25)
at WebpackConfig.buildRules (/Users/[redacted]/Dev/DisclosuresReader/node_modules/laravel-mix/src/builder/WebpackConfig.js:90:13)
at WebpackConfig.build (/Users/[redacted]/Dev/DisclosuresReader/node_modules/laravel-mix/src/builder/WebpackConfig.js:23:14)
at Object. (/Users/[redacted]/Dev/DisclosuresReader/node_modules/laravel-mix/setup/webpack.config.js:29:38)
at Module._compile (/Users/[redacted]/Dev/DisclosuresReader/node_modules/v8-compile-cache/v8-compile-cache.js:194:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1160:10)
at Module.load (internal/modules/cjs/loader.js:976:32)
at Function.Module._load (internal/modules/cjs/loader.js:884:14)
at Module.require (internal/modules/cjs/loader.js:1016:19)
at require (/Users/[redacted]/Dev/DisclosuresReader/node_modules/v8-compile-cache/v8-compile-cache.js:161:20) {
code: 'MODULE_NOT_FOUND'
I'm using TALL v2.0.0 on Laravel 8, fresh install with auth.
First attempt at logging in via the Login component, I got the following error:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'remember' in 'where clause' (SQL: select * from
users
whereremember
= 0 limit 1)
This appears to be due to the validation in the Login component's authenticate()
method:
$credentials = $this->validate([
'email' => ['required', 'email'],
'password' => ['required'],
]);
It seems $this->validate()
will return all public members of the component class, whether they are listed in the validation rules or not. The $remember
member therefore gets sent to Auth::attempt()
so it adds it into the users
query.
If this is desired behaviour by Livewire, then the issue is with the component needing to restrict $credentials
to the keys in the rules array only. If this isn't desired behaviour then I guess this is a Livewire bug?
There are some problems if you don't use your app at a root domain, e.g. your-app.test/test
, then the asset and mix files won't get recognized. This can get fixed with the function url()
.
Sorry if this is a dumb question but how do you update tailwind to the latest version for an existing application?
I want to use Tailwind animations that requires v1.6.0+
I figured I'd raise this as a discussion point to see what people think so we can come to a consensus before raising anything.
Right now we've got a handful of CSS classes we re-use all over the auth views, in particular for things like <button>
styles. In most real applications, I'd personally see this as something I need to commonly reuse, and I'd extract it to either a Blade component <x-button>
or CSS class .button
That said, the buttons we have so far are not typical buttons you'd find in an app - there's no primary/secondary/danger/etc. styles and it's not guaranteed people will use these styles again as the button is specifically styled for the auth pages.
Thoughts?
While the current preset was made to pretty much a match the existing laravel/ui presets one-to-one, I feel like we could probably go a little bit further for people that want it, to get even closer to a real-world application, and offer some extra utilities out of the box.
Here are some of the things I think this "extra" option could possibly do:
It may be a little more opinionated than the basic version, without being a full-blown boilerplate.
What do people think of this? Is this something we could consider or is it just out of the scope of this package?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.