Application copied to a different folder - laravel-7

I had copied my app to a different folder at the same computer (I'm using XAMMP), I've copied the database with a different name too, at the same computer of course, modified the database name at .env, pointing to the new created database. I've got a big page not fould message (localhost/app/login).
Seem that my routes are not working.
I updated composer, App key, cleared all caches with the same result.
Any help will be appreciated

Related

Delete Repository and history

I had to upload my php code to my GitLab project for my university class. Unfortunately I uploaded the wrong data and now I just want to delete all of the data again und upload my new correct data. When I deleted the data manually I still be able to see them in the history. So is there a way to just delete everything I just uploaded? And I am not allowed to delete the whole project because other members have some subprojects.
I am using Windows 10 by the way.
Thanks a lot!

Regarding user settings - whats the purpose of the assets folder?

I want to find the correct place to save my user settings for my uwp app. I know there exists:
local: Data that exists on the current device and is backed up in the cloud
roaming: Data that exists on all devices on which the user has installed the app
temporary: Data that could be removed by the system any time the app isn't running
-localcache: Persistent data that
exists only on the current device
I can access the above places with ApplicationData.Current. Which are located somewhere in C:\Users\bla\AppData\Local\Packages\1e7e-94a6-4235-a0c5-9b143f8b_8webbwe
The project also contains a Asset folder, and I can't find a good source which tells me where the folder is located when the app is installed (not in developer mode).
Some developers place there settings into the asset folder. Why? What's the advantage? Is there also a file size limit like for ApplicationData.Current ? When deploying a settings folder into the asset folder will it be available for all user which installed my app? Any background informations regarding the asset folder are appreciated.
Settings files are most appropriate in the ApplicationData folders or ApplicationData.LocalSettings or .RoamingSettings See Store and retrieve settings and other app data
The assets folder is purely a convention. The "assets" name is not special other than to suggest what types of files go in the folder. It is just a useful way to organize the application package to have a place for assets (images, etc.) that are used in the app.
When the app is installed the assets will be in the Package.InstalledLocation directory and can be addressed with an ms-appx:///assets/ URI. Typically this will end up somewhere in \Program Files\WindowsApps\.
Putting a settings file in assets would be a bad idea as the InstalledLocation is read-only and as settings are user data.
There is no hard size limit for files in ApplicationData folders, although if too much data is stored in RoamingFolder then it won't roam. The files will still be available locally.

heroku retain files/folders while re-deploying new version of nodejs application to heroku

My folder structure for images looks like below
./public/img/**
under img folder I have following folders - categoryImages, languageImages, socialShareImages and userImages.
Now I want to retain the userImages as this contains images uploaded by user, But every time I deploy a new version of my app to heroku with "git push heroku master" it overwrites userImages folder.
I tried without userImages folder in my git repository but even this doesnt help. Looks like everytime you upload a new version of app every folder and file is rewritten. Now question is how can I retain this userImages folder?
Regards,
Chidan
Heroku has a ephemeral filesystem and as far as I know, (and as much as I wish it weren't) I don't think you can get any files to persist.
However, heroku offers a free Postgres database per app, and anything in your database will persist. You'll have to use the node.js pg package to access Postgres.
Edit: I believe it's also possible to use S3 (which might work better for something like images). You'll have to look that up though.

Incompatible managed object model

I'v built the app, with a working datamodell with one entity. The managedObjectContext works fine with the arrayController, and a TableView. A pretty straightforward, and common setup.
There's almost no code yet, I'm just trying to play a bit with coredata.
The problem is, when I change the modell, for example add a new entity, it no longer compatible, end show two errors while loading the app.
here are the errors:
The managed object model version used to open the persistent store is
incompatible with the one that was used to create the persistent store.
Failed to initialize the store
I guess somehow it tries to load to last model to the array, but i'm not intrested in that. I want to use the new one, and get rid of everything else.
I search stackoverflow and google all around, so I've cleaned the build folder, cleaned the app, still not working. Those folders in Library or Library/Application for my app name does not exists.
How to solve the problem, and make the app to use the new DataModel?
You have to delete the store file (the actual sqlite store). It will be recreated in your AppDelegate when you start the app again.
If you are using the simulator, you can go into the documents folder and delete it yourself. (Complicated.)
You can set a flag in your program and delete the store if set to true. That is a good setup for testing, especially when your data set is not too large and if you do not need your entered data to persist across relaunches. (Recommended.)
You simply delete the app from the device / simulator. (Easiest.)

Some default objects of core data entities

Here I have some entities in core data, for example, "Account",
and I wish that, when user enter my app for the first time, there is some thing in Account,
to make it more clear, maybe I should say I want to give some default managed-objects for an entity so that they will be there when the app is just installed.
How can I achieve this?
Thanks a lot!
I have a similar requirement for an app I'm working on. I am using a sqlite persistence store for my data, so I basically want to pre-populate that table with the data for my default entities.
To do this, I have created a separate project in my Xcode workspace that shares the same data model with my app. In this separate project I write the code I need to insert entities into the table, and to store the file in a well-known place on my Mac.
Then, I copy the sqlite file that my initializer app has created into the resources directory for my "real" app. As part of the startup for that app, I wrote a small bit of code that copies the default DB from the resources to my app's documents folder if a copy doesn't already exist there.
The end result is this: I can run my initializer app to populate the default data as I need to. I then copy the file into my real app, so when the app is first run there is a default copy of that DB ready to go.

Resources