bashovski

bashovski

Member Since 1 Month Ago

Experience Points 200
Experience Level 1

4,800 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-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-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-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist 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.

11 Sep
4 days ago

bashovski left a reply on Gather Bearer Token From Deployed Webapp

Thank you. I've resolved that problem, but in fact, I am experiencing another one after the POST/GET request has been called to an API endpoint. The response is always: { "message": "Server Error" } in JSON format, of course.

Same code with right tokens works normally on local environment, but this occurs only in deployed app.

EDIT: I've changed APP_DEBUG to true to display errors, this one shows up:

Key path "file:///app/storage/oauth-private.key" does not exist or is not readable

Sorry for being annoying.

bashovski started a new conversation Gather Bearer Token From Deployed Webapp

Hello, I am having problem regarding gathering authorization token which should be in format of: 'Bearer [token]'. Unfortunately, I can't access it by calling API requests from my HTTP client (Insomnia in this case) since I don't have any keys to access the database and I don't really know if there is a way to generate these essential keys and tokens remotely. Also, I don't use Forge to manage deployed app. I hope you can share a way of gathering these tokens/keys with me, I would be very grateful. Thanks in advance, best regards!

07 Aug
1 month ago

bashovski left a reply on CORS Access To XMLHttpRequest At X From Origin Has Been Blocked By CORS Policy

Yes I do have permission to retrieve the data.

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

Here is their documentation, although I find it quite poor: https://openweathermap.org/api (located at the bottom)

bashovski left a reply on CORS Access To XMLHttpRequest At X From Origin Has Been Blocked By CORS Policy

@cometads

  1. I've tried it now, unfortunately no results if middleware is set either on the top of 'api' group or on the top of global group.

  2. My Insomnia perfectly returns JSON from the endpoint with HTTP CODE: 200, so it does exist.

bashovski started a new conversation CORS Access To XMLHttpRequest At X From Origin Has Been Blocked By CORS Policy

CORS Access to XMLHttpRequest at X from origin has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.

Hi, I am struggling to resolve my problems with CORS denying interaction of my Vue component with an external API with axios since it returns this error. I've tried both using Barryvdh's Cors header support and making a middleware and custom route. It simply won't work. Everything that has been mentioned in README.md in Barryvdh's repo has been done and unfortunately, this problem won't get resolved by any means necessary.

Here is the code, even though I don't think there's need to show since it's exactly the same as mentioned in the repo;

inside Kernel.php:

protected $middleware = [
    \Barryvdh\Cors\HandleCors::class,

inside app.php (providers array):

Barryvdh\Cors\ServiceProvider::class,

config/cors.php:

'supportsCredentials' => false,
'allowedOrigins' => ['*'],
'allowedHeaders' => ['*'],
'allowedMethods' => ['*'], // ex: ['GET', 'POST', 'PUT',  'DELETE']
'exposedHeaders' => [],
'maxAge' => 0,
03 Aug
1 month ago

bashovski left a reply on Laravel Polymorphic Comments System

Solved, please lock the thread. Thanks!

bashovski started a new conversation Laravel Polymorphic Comments System

Hi, I am pretty new to Laravel (working with for a week or so) and I've touched some many to many relationships with pivot tables and now, polymorphic relationship, since I need to use it for my small project I am working on. So, here is what I've done, and I will carefully explain problems which I am having:

I've made a migration for comments which includes columns id, commentable-type, commentable-id and text (a string which I will use in views).

        $table->bigIncrements('id');
        $table->integer('commentable_id')->unsigned();
        $table->string('commentable_type');
        $table->string( 'text' );
        $table->timestamps();

After doing that, I've made a model and a view for comments (right naming convention): Comment and CommentsController.

Here's what I've added inside my controllers and models: (NOTE: Submission down below is almost an equivalent of a post)

Comment.php model

public function commentable() {
    return morphTo();
}

Here's User.php model (you can ignore the first function since it is already there before making comments, but I've added it here so you can see the relationship between user and submissions which I've implemented)

public function submissions() {
    return $this->hasMany( Submission::class )->orderBy('created_at', 'DESC');
}
public function comments() {
    return $this->morphMany( 'App\Comment', 'commentable' );
}

Submission.php model

public function comments() {
    return $this->morphMany( 'App\Comment', 'commentable' );
}

So, here are the issues I am experiencing due to lack of experience and knowledge, please don't judge me, I don't have no excuses for not knowing how to deal with this.

Issue: I am having problems while creating a comment for a submission and user indirectly from submission's link (/submissions/{id here}) since I can't pass any data from the submission (at least a submission ID) and I don't really know how to access the submission (equivalent of post) in the controller where I am calling the store method for creating a new comment.

I couldn't really find any good tutorials regarding polymorphic relationship which (should 've) included creation of new instance such as comment, in my case.

I hope you could tell my what am I doing wrong and maybe help me a bit to solve this problem which I've been struggling with for hours.

Thanks in advance!