Member Since 8 Months Ago
3,820 experience to go until the next level!
In case you were wondering, you earn Laracasts experience when you:
Earned once you have completed your first Laracasts lesson.
Earned once you have earned your first 1000 experience points.
Earned when you have been with Laracasts for 1 year.
Earned when you have been with Laracasts for 2 years.
Earned when you have been with Laracasts for 3 years.
Earned when you have been with Laracasts for 4 years.
Earned when you have been with Laracasts for 5 years.
Earned when at least one Laracasts series has been fully completed.
Earned after your first post on the Laracasts forum.
Earned once 100 Laracasts lessons have been completed.
Earned once you receive your first "Best Reply" award on the Laracasts forum.
Earned if you are a paying Laracasts subscriber.
Earned if you have a lifetime subscription to Laracasts.
Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.
Earned once you have achieved 500 forum replies.
Earned once your experience points passes 100,000.
Earned once your experience points hits 10,000.
Earned once 1000 Laracasts lessons have been completed.
Earned once your "Best Reply" award count is 100 or more.
Earned once your experience points passes 1 million.
Earned once your experience points ranks in the top 50 of all Laracasts users.
Earned once your experience points ranks in the top 10 of all Laracasts users.
Started a new Conversation Display Used Tags In Post
Hi, im trying to display tags by
@foreach($post->tags as $tag)
<a class="tags" href="">{{ $tag->name }}</a>
@endforeach
but i have error from datebase:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'voyager.tag_post' doesn't exist (SQL: select `tags`.*, `tag_post`.`post_id` as `pivot_post_id`, `tag_post`.`tag_id` as `pivot_tag_id` from `tags` inner join `tag_post` on `tags`.`id` = `tag_post`.`tag_id` where `tag_post`.`post_id` = 5) (View: G:\XAMP\htdocs\laravel\voyager\resources\views\post\post.blade.php)
Post model:
public function tags()
{
return $this->belongsToMany('App\Tag', 'tag_post');
}
Tag model:
public function posts()
{
return $this->belongsToMany('App\Post');
}
Controller:
public function index()
{
$posts = Post::orderBy('created_at', 'desc')->where('status', 'PUBLISHED')->Paginate(4);
$featured_posts = Post::where('status', 'PUBLISHED')->where('featured', '1')->orderBy('id','desc')->take(5)->get();
$categories = Category::all();
$tags = Tag::all();
$recent_posts = Post::where('status', 'PUBLISHED')->orderBy('created_at','desc')->take(5)->get();
return view('layouts.blog', compact('posts', 'categories', 'tags', 'featured_posts', 'recent_posts'));
}
Replied to I Have No Images After Symlink() Connected (storage:link)
i changed location of storage to other folder and everything is work (filesystem.php)
Replied to I Have No Images After Symlink() Connected (storage:link)
I was take it all from sharehosting and deploy in localhost changing only .env, and when i start generate links, all images work but not in sharedhost.
Today host send me logs with errors: " AH00037: Symbolic link not allowed or link target not accessible: /homez.269/domain/www/public/storage"
Replied to I Have No Images After Symlink() Connected (storage:link)
I appreciate you wanting to help me but you are not helping at all and stop wasting my time on your games..
Replied to I Have No Images After Symlink() Connected (storage:link)
1.www i said it 4 times in this topic
2.404 because i dont have dir like this
Replied to I Have No Images After Symlink() Connected (storage:link)
really im tired.. couple days without sleep. how you want to confirm it? (structure/symlink)
Replied to I Have No Images After Symlink() Connected (storage:link)
if i delete it i will lose site view and i will get files list from serve
Replied to I Have No Images After Symlink() Connected (storage:link)
restored. nothing changed, still missing images
but. i have 1 more htaccess for root folder (www)
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
RewriteCond %{REQUEST_URI} !^public/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ public/
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
RewriteRule ^(/)?$ public/index.php [L]
</IfModule>
Replied to I Have No Images After Symlink() Connected (storage:link)
Forbidden You don't have permission to access this resource.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
Replied to I Have No Images After Symlink() Connected (storage:link)
ffs..
The [/home/domain/www/public/storage] link has been connected to [/home/domain/www/storage/app/public].
The links have been created.
YES.
Replied to I Have No Images After Symlink() Connected (storage:link)
Here you go :D https://i.imgur.com/lSoy9eI.png
btw. its sharedhost from ovh im not doing this in localhost
jlrdw and snapey say to made this structure and other tuts. im trying to understand this all but everyone says differently.
Replied to I Have No Images After Symlink() Connected (storage:link)
yes, i said about it couple post ago. folder: www = public_html
Replied to I Have No Images After Symlink() Connected (storage:link)
ehh, everyone says differently.. but ok i made structure like you say..
Laravel
├── app
├── public
│ └── storage
├── vendor
...
└── storage
The [/home/domain/www/public/storage] link has been connected to [/home/domain/www/storage/app/public].
The links have been created.
and no images...
Replied to I Have No Images After Symlink() Connected (storage:link)
@michaloravec how to use this command?
i was doing something like this
delete storage (from public_html)
clear
voyager::compass.commands.command_output:
Compiled views cleared!
Application cache cleared!
Route cache cleared!
Configuration cache cleared!
Compiled services and packages files removed!
Caches cleared successfully!
voyager::compass.commands.command_output:
The [/home/accc/www/storage] link has been connected to [/home/accc/domain/storage/app/public].
The links have been created.
Replied to I Have No Images After Symlink() Connected (storage:link)
(Z) Look at picture.. is up. i don't messing with anything
domain-> laravel, www->public_html
domain(rest of laravel)
├── app
├── bootstrap
├── config
├── db
├── hooks
├── resources
├── routes
├── storage
├── teste
├── vendor
...
www(public_btml <- here is contect from public.)
├── storage
├── bootstrap
├── src
├── index.php
now its clear for you..?
Replied to I Have No Images After Symlink() Connected (storage:link)
Hi, @laracoft . content from public is in www(public_html), other files from laravel is next to "www" folder named for example "domain". symlink (storage:link) generate folder in www(www/storage) but this storage really is in domain/storage/app/public
https://i.imgur.com/eFxI7E0.png
when i check image url: "Forbidden You don't have permission to access this resource."
Started a new Conversation I Have No Images After Symlink() Connected (storage:link)
www/index.php
require __DIR__.'/../domain/vendor/autoload.php';
$app = require_once __DIR__.'/../domain/bootstrap/app.php';
$app->bind('path.public', function() {
return __DIR__;
});
domain/server.php
if ($uri !== '/' && file_exists(__DIR__.'/../www/'.$uri)) {
return false;
}
require_once __DIR__.'/../www/index.php';
www/.htaccess
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
Options +FollowSymLinks
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Send Requests To Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
www dir https://i.imgur.com/jCN68qy.png
Replied to Laravel/voyager - Avatar
[2020-09-27 14:12:31] local.ERROR: Trying to get property 'avatar' of non-object (View: /home/srv****/domains//*****/vendor/tcg/voyager/resources/views/master.blade.php) {"exception":"[object] (Facade\Ignition\Exceptions\ViewException(code: 0): Trying to get property 'avatar' of non-object (View: /home/srv/domains/*****//vendor/tcg/voyager/resources/views/master.blade.php) at /home/srv***/domains/**//vendor/tcg/voyager/src/../resources/views/master.blade.php:67)
it's look there is something with voyager panel
67 start from if
<?php
if (\Illuminate\Support\Str::startsWith(Auth::user()->avatar, 'http://') || \Illuminate\Support\Str::startsWith(Auth::user()->avatar, 'https://')) {
$user_avatar = Auth::user()->avatar;
} else {
$user_avatar = Voyager::image(Auth::user()->avatar);
}
?>
Started a new Conversation Laravel/voyager - Avatar
Facade\Ignition\Exceptions\ViewException Trying to get property 'avatar' of non-object
this error i see when i want use php artisan route cache / config cache etc
Replied to 403 Forbidden Access To This Resource On The Server Is Denied!
ok i solve it by adding code to : App/providers/AppServiceProvider.php
$this->app->bind('path.public', function() {
return base_path('../public_html/subdomain');
});
after that i use "php artisan storage:link" and storage and all is working
Replied to 403 Forbidden Access To This Resource On The Server Is Denied!
i removed storage and i use "php artisan storage:link" but still i have "ErrorException symlink(): No such file or directory"
Replied to 403 Forbidden Access To This Resource On The Server Is Denied!
No link to data storage location. A symbolic link to the data storage location could not be found. This can cause problems loading media files in the browser.
ErrorException symlink(): No such file or directory
Replied to 403 Forbidden Access To This Resource On The Server Is Denied!
Ok, then it is incorrect what ppl say to move project folder to root folder. the correct way is to move project to domain folder alongside the public_html. Mhhhhhm, now i dont have 500 but i still have errors
ErrorException
file_put_contents(G:\XAMP\htdocs\myproject\storage\framework/sessions/TlbntA0pnA6qgMDHNnSTvu9fqSLUdWc6pUmcWW77): failed to open stream: No such file or directory
up -> maindomain/project/bootstrap/cache i changed name of config.php and page is work but storage etc nope
my contect from public still is in subdirectory how was earlier /domains/maindomain/public_html/subdomain
where should by storage&bootstrap?
Replied to 403 Forbidden Access To This Resource On The Server Is Denied!
i have it in subdomain folder (index.php and htaccess). you can see it in picture from my previus post. I think this is not log from now and there is no log of this. apache didn't notice errors from one hours ago to now
Replied to 403 Forbidden Access To This Resource On The Server Is Denied!
all 4 folders are writable(755). https://i.imgur.com/hQrZYkU.png project is on laravel 7 and php 7.4
log say: "Auto Index is disabled for [/home/srv*****/domains/maindomain/private_html/subdomain/], access denied" but this log is from 1h ago
Replied to 403 Forbidden Access To This Resource On The Server Is Denied!
Ok, i will start from beginning with fresh files
My laravel project (subdomain <- its name folder) is in root folder. i took content from "public" folder and move to public_html/subdomain
public_html/subdomain/index.php
require __DIR__.'/vendor/autoload.php';
$app = require_once __DIR__.'/bootstrap/app.php';
i changed to:
require __DIR__.'/../../subdomain/vendor/autoload.php';
$app = require_once __DIR__.'/../../subdomain/bootstrap/app.php';
next what i changed is: root/subdomain/server.php
if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {
return false;
}
require_once __DIR__.'/public/index.php';
To:
if ($uri !== '/' && file_exists(__DIR__.'/../public_html/subdomain'.$uri)) {
return false;
}
require_once __DIR__.'/../public_html/subdomain/index.php';
.htaccess from public_html/subdomain
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Send Requests To Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
aaand 500
Replied to 403 Forbidden Access To This Resource On The Server Is Denied!
I try everything to make it work. on subdomaind and main domain. to on purpose i wish it was in subdomain.. for now..
im allready do everything from that link and i have 500
Replied to 403 Forbidden Access To This Resource On The Server Is Denied!
for now i trying this : https://laracasts.com/discuss/channels/laravel/laravel-on-shared-hosting-6
but i have a error 500
Replied to 403 Forbidden Access To This Resource On The Server Is Denied!
this is worst of deploying when i was ever see. im trying 30 methods to do this and nothing works. fking great. gg laravel
Replied to 403 Forbidden Access To This Resource On The Server Is Denied!
i changed path/dir in index with my project folder i allready have 403 or 500 erorr. its direct admin (shared host) laravel 7. this tut noting help..
Started a new Conversation 403 Forbidden Access To This Resource On The Server Is Denied!
Project is on subdomain.
permisions is 755 for public_html, project etc
.htacccess from project
Options -MultiViews -IndexesRewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
i updated index.php with currect dir
Replied to How To Save Data From Checkbox
this is too much code for me. but i solve it. i needed to change $request->get('gpdr'), to $request->has('gpdr') and all works fine
Started a new Conversation How To Save Data From Checkbox
https://flareapp.io/share/OmVkz8P8#F40 ERROR
https://pastebin.com/Q2CaQyRG contactphp
https://pastebin.com/A0LaCrbx controller
https://i.imgur.com/fTgcn7L.png phpmyadmin
Replied to Sending Mails Without Smtp - Laravel 7
Ok, then how can i override env settings(use other mail config) to take data from database?
Replied to Sending Mails Without Smtp - Laravel 7
Yes. becouse if i use smtp with forward mail, gmail block it as a danger/ virus and send it to spam with danger nothification. why you comlain it.. i want send data from form directly to provider without login to mail server. in other wise i need a function who change smtp settings in voyager admin panel.
Replied to Sending Mails Without Smtp - Laravel 7
i don't want forward mails..with mail server. only send directly to recipient by xmailer/sendmailer without smtp,pop etc settings.
Started a new Conversation Sending Mails Without Smtp - Laravel 7
Hi, im doing this for first time, can someone explaine to me how can i do it? for now mails are saving in database but i want to sendmails to email without settings smtp (user,password etc)
config/mail.php -> https://pastebin.com/eZtN0F0E controller -> https://pastebin.com/YMaVxbXb mail/contact -> https://pastebin.com/DavbhsdL mailblade -> https://pastebin.com/QuTXm1UP
env: MAIL_MAILER=sendmail MAIL_HOST=smtp.mailtrap.io MAIL_PORT=2525 MAIL_USERNAME=null MAIL_PASSWORD=null MAIL_ENCRYPTION=null
Started a new Conversation Pagination Translate Is Not Working
Hi, i have a problem with "SimplePaginate"
https://i.imgur.com/oizsM5M.png
https://i.imgur.com/erOsx4C.png
Replied to 404, Non-objects
@ajithlal https://i.imgur.com/qJqVMrR.png
dd show https://i.imgur.com/8xaYYNl.png
now is working... lol o.0 thanks @ajithlal
Replied to 404, Non-objects
@mvd Illuminate\Database\Eloquent\Collection {#1605 ▼ #items: [] }
there is no items.
https://i.imgur.com/7Ollz8v.png this is from homepage
@foreach ($offers as $offer)
@include('offers.front-offer', ['offer' => $offer])
@endforeach
Replied to 404, Non-objects
Facade\Ignition\Exceptions\ViewException Property [body] does not exist on the Eloquent builder instance. (View: G:\XAMP\htdocs\laravel\voyager\resources\views\offers\show.blade.php)