User profile image can not show in laravel 8 - laravel

I'm using laravel 8. I have used jetstream for user registration. Profile photo feature is being used, But it did not show profile image.
I help from you good people.
#coding

Make sure the APP_URL is correct in your .env file including port. ie. if you are running on localhost and port 8000 your APP_URL should be APP_URL=http://127.0.0.1:8000.
If the profile photo is stored successfully and that didn't work try:
Deleting the shortcut folder storage created at /project/public/
run php artisan storage:link
The photo should show up.

Related

images not showing using spatie media library in filamentphp

I am having trouble displaying the images uploaded using spatie media library with the filament admin panel.
image for clarificatio
This is the code for form schema :
SpatieMediaLibraryFileUpload::make('thumbnail')->collection('posts')
And this is the code for table columns
SpatieMediaLibraryImageColumn::make('thumbnail')->collection('posts')
Thanks.
Check your APP_URL and take care of the correct port.
You should use:
php artisan storage:link
Check in your .env (root folder of your laravel project) file that the APP_URL is the same as your server url.
You get the server url on startup (php artisan server) mine is http://127.0.0.1:8000. (or http://localhost:8000)
So you fill in from APP_URL=http://127.0.0.1 and change to APP_URL=http://127.0.0.1:8000
If you have localhost fill in APP_URL=http://localhost:8000
Check if the files are uploaded to your storgae and been linked with your public folder.
In your CLI: php artisan storage:link

unable to load images from storage path on shared hosting in laravel 9 and laravel voyager admin

i have a project in laravel 9 with laravel voyager admin panel. my problem is when i am using CLI to launch the app everything is fine but when i upload my website to shared hosting of htdocs (in case of localhost) images from storage folder is not loaded.
You need to locate your photo in the public access folder read Voyager documentation and also you need to keep your statice photo in the separate folder

How to fix broken Laravel link to local file system?

We inherited a custom laravel app and in the admin area, a link that points to a file in the local storage has broken:
This site can’t be reached
The webpage at https://domain.tld/admin/donor/1818/document/56/DCCA8ACC-7B1B-4D90-977C-257BDA5AE56E.png might be temporarily down or it may have moved permanently to a new web address.
ERR_INVALID_RESPONSE
These links used to work, so I'm not sure what broke. I've verified that the all folders and files in the app have correct permissions and ownership.
You need to make the storage public if you didn’t set it up.
php artisan storage:link
See the docs for more details.

My site doesnt output laravel page...What shoud i do?

On browser, typing localhost/spa1/public or spa1.test doesn't output the laravel. I've been stuck and cant even proceed to starting my project because of this. I really need help!!
The output supposedly :
enter image description here
The app key is :
APP_KEY=base64:lEpLqsi9GOqaz6eyu5VaTft0UOfj7u+A4LAie6LEJoc=
I'm using xampp on windows
My problem is y it doesnt output the Laravel page like the Google one?
In your terminal, you should start the server.
php artisan serve
This will create a home URL like localhost:8000 and read index.php file in the public folder.
BTW, the image you share is Laravel's default home page. If you look at welcome.balde.php file, you can see the same content there. So your app is running. But it's not a good idea to display your app without artisan serve.
Your code is fine, and this is how the home page looks like in Laravel 8. Because the home page you're talking about was in Laravel 7 & below. And from Laravel 8 onwards, the default home page of Laravel 8 is updated and looks like the one you're getting right now.

Set Laravel Application Urls

Fairly new to Laravel here and I'm struggling to understand how to make Laravel 5.2 aware of where it resides. Here's the issue:
I set up auth using php artisan make:auth, and can now see the lovely landing page, as well as login and register links in the menu. The problem is that these links don't go to the right place. They point to /login and /register in the code respectively, which translates into http://localhost/login or http://localhost/register. But since I'm not on a production site yet and am developing locally, my website resides at http://localhost/projectname/public.
I've gone into config/app.php and tried various values for the URL parameter, but these have no effect.
What can I do to get these links to reflect the full site URL, without manually entering it each time?
you can run the development server in laravel using this command
php artisan serve
Did you try that?
Use laravel url function:
{{ url().'/login' }}

Resources