Hekmatyar

Hekmatyar

Member Since 5 Months Ago

Experience Points
1,180
Total
Experience

3,820 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
0
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start your engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-in-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist Created with Sketch.

    Laracasts Evangelist

    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.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

Level 1
1,180 XP
Oct
16
6 days ago
Activity icon

Replied to Display Used Tags In Post

haha, im blind sometimes ;-; thanks

Activity icon

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'));

       
    }

https://i.imgur.com/URBqDLH.png

Oct
01
3 weeks ago
Activity icon

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)

Activity icon

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"

Activity icon

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..

Activity icon

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

Activity icon

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)

  1. env saytome: https://mydomain.com - im using rewriterule to load index.php in '/' from 'public/index.php'
  2. /public/image.png is work
Activity icon

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

Activity icon

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>

Activity icon

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.

Activity icon

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.

Sep
30
3 weeks ago
Activity icon

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.

Activity icon

Replied to I Have No Images After Symlink() Connected (storage:link)

yes, i said about it couple post ago. folder: www = public_html

Activity icon

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...

Activity icon

Replied to I Have No Images After Symlink() Connected (storage:link)

@michaloravec how to use this command?

i was doing something like this

  1. delete storage (from public_html)

  2. 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!
  1. storage:link
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.
Activity icon

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..?

Activity icon

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."

Activity icon

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

Sep
27
3 weeks ago
Activity icon

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);
}
?>
Sep
26
3 weeks ago
Activity icon

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

Activity icon

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

Activity icon

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"

Activity icon

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

Activity icon

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?

Activity icon

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

Activity icon

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

Activity icon

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

Activity icon

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

Activity icon

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

Sep
25
3 weeks ago
Activity icon

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..

Activity icon

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 -Indexes
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]

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

i updated index.php with currect dir

Activity icon

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

Sep
24
4 weeks ago
Activity icon

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?

Activity icon

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.

Activity icon

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.

Activity icon

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

Jul
24
2 months ago
Jul
23
2 months ago
Activity icon

Replied to 404, Non-objects

i dont know why is "null"

Activity icon

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
Activity icon

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)

Activity icon

Replied to 404, Non-objects

https://i.imgur.com/ifo4vEr.png what you want to know?