#Laravel Breeze just deleted ~40h of work
38 messages · Page 1 of 1 (latest)
It should really be clear in the docs. It even removed my package.json?!
They do mention that tho..?
Breeze provides a minimal and simple starting point for building a Laravel application
Even in the installation;
First, you should create a new Laravel application
Starting point !== removes all JS, CSS and Packages
of course one has to create a new project before installing
Breeze isn't a "backend library". It creates views and styles for you.
All they do is talk about a new application, not existing applications 🤷♂️
It didn't though? I chose the API scaffolding
It should delete my Dropbox folders as well because why not? It's a starting point bro!
Get owned honestly
You're not even using git locally for 40 hours of work? Consider this a lesson to start doing that
Nah, I can recover the files, it's not a problem. But it's still really unclear why Breeze removes app.css, package.json, everything in resources/js/. I didn't even choose a frontend framework.
Is it that hard to add a message to the breeze:install command that says:
"Warning: we will remove anything we feel like, even if it's unrelated to what you're trying to install"
If you can recover the files, why cry about it? Go add a PR to this open source framework because you misunderstood what breeze is meant for. Can't please everyone.
At first it seemed my local history wasn't working and this caused some serious stress. I'll PR a warning.
Then make a PR to the docs that indicate it?
I get that it's kinda annoying you lost your shit, but honestly, the use-case for breeze are mentioned. And yeah, the breeze api scaffold makes your app an "API only", thus removing all things unrelated to an API (such as npm) is expected imho. I feel like a lot of devs have gotten in the habit of blindly executing commands and then it doesn't do what they expect, then to blame the package..
Ok I'm a bit curious @gritty palm - why shouldn't the API stack remove styles etc? Reading the code:
https://github.com/laravel/breeze/blob/1.x/src/Console/InstallsApiStack.php#L73
It makes sense...? You choose to use Laravel as a backend for your API, which usually means your app isn't gonna reside within Laravel. That's where you'd use Inertia instead
I wouldn't say it is expected that an authentication package (or any package really) would remove anything unrelated to itself just because it doesn't concern the package. Running npm install vue doesn't remove any all blade files because "hey, this person only wants Vue"
That point doesn't make sense, since Breeze assumes a fresh Laravel app. It removes the default files that are present in a new app, it doesn't randomly remove other files. That's why it's mentioned in the docs to use it in a new app, not an existing one, as it would have side effects
Like the Vue scaffold only removes the welcome blade file afaik, because that's the only one that exists in a new Laravel app.
Again, why install the API stack if you've built your frontend within Laravel. Are you gonna send API requests from domainA.com to... domainA.com ?
You're not the only one who's been owned by this, but it's also clear that people fire off commands willy nilly and get upset when it doesn't do as expected.
I can get that maybe what exactly happens should be more clear to beginners or warn you first
But I'll agree to disagree about the "it shouldn't delete files"
The files deleted are completely unrelated to authentication though. Honestly, you seem to defend a pretty unnecessary side effect that is easily avoidable. I'm not saying I couldn't have avoided this but see it from my point of view and process:
- Oh, Christmas holidays, let's try this thing I've been thinking about.
- Spend hours building a nice UI using Laravel Blade and Vue. No real backend except for controllers returning blade views yet.
- "Oh, I need authentication soon, Breeze seems like a br..."
php artisan breeze:install
Laravel Breeze's default view layer is made up of simple Blade templates styled with Tailwind CSS.
"Don't need that, just want the API"
Laravel Breeze can also scaffold an authentication API that is ready to authenticate modern
...
During installation, Breeze will add a FRONTEND_URL environment variable to your application's .env file.
"Sounds good!"
- The whole UI is gone
Laravel Breeze can also scaffold an authentication API that is ready to authenticate modern JavaScript applications such as those powered by Next, Nuxt, and others.
It explains what the API stack is tho? It's to scaffold a new app that'll be consumed by a frontend app. You seem to be blaming Breeze for not reading the docs or having a different idea of what it was supposed to do.
Like I mentioned multiple times now, Breeze installs in a fresh app, not an existing one, that's mentioned in the very first line of the installation guide. For example Telescope doesn't mention that, I wonder why..
And again... You seem to defend a mistake on your part for assuming it works like X but works like Y.
It's super cringe that you're basically creating a help thread to complain, not to actually get help.
It's a starter kit meant to re-transform your base Laravel app into one that has auth out of the box.
And again... Blade + API stack makes absolutely no sense.
I understand what you're saying but I don't think it is clear that it will remove existing files that the package deem unnecessary, that's all I'm saying. I understand that it might overwrite existing files but not remove.
It's a starter kit meant to re-transform your base Laravel app into one that has auth out of the box.
If this was in the docs, this wouldn't have happened.
The Help thread was because I didn't understand at all what was going on.
Bro literally stop crying
Now I'm concerned that if I remove Breeze, will it remove the whole project?
"THE DOCS CANT CHANGE THEY'RE PERFECT AND ALL PACKAGES SHOULD REMOVE ANYTHING THEY DON'T LIKE"