troelsjohnsen

troelsjohnsen

Member Since 4 Years Ago

Experience Points 1,345
Experience Level 1

3,655 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 21
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.

19 Jun
1 month ago

troelsjohnsen left a reply on Enable Remote Access To Database Without SSH

I can't actually remember how I solved this issue, but I think it was related to another firewall in front of the server I was trying to connect to.

So I had to configure the firewall through the Forge dashboard, but also the firewall in front of the server.

troelsjohnsen started a new conversation Using Local Packages To Organize Code Within Same Project

Hi everybody

I am working on a big project that involves a lot of different functionalities.

I am thinking a bit about how to organize the code, and specifically I am thinking about separating some of the code into custom packages, which still lives within the main project / repository, like this

  • packages
    • vendor
      • package1
      • package2

The reasoning behind this is of course keeping the project clean by separating code, models, migration into meaningful modules, but also the possibility to extract the code into real packages later on.

I would only do this for functionality that is within a specific domain, such as a library or integration with a specific vendor.

Do you have any experiences with this approach - is this a good way to organize the code or would there be any pitfalls?

troelsjohnsen left a reply on Custom Package's Dependency Not Installing

@ricus

I know this thread is a bit old, but I'll just leave this here for future reference.

As mentioned by @kenokokoro you need to require the local package from your main composer.json, but before you can do this, you need to also add the local repository. Like this.

"require": {
      ...
      "vendorname/packagename": "dev-master"
  }

"repositories": [
      {
          "type": "path",
          "url": "packages/vendorname/packagename",
          "options": {
              "symlink": true
          }
      }
  ]
09 Sep
10 months ago

troelsjohnsen left a reply on Nova Dashboard Not Working

I get that exact error after updating to 1.0.14 :-(

25 Aug
10 months ago

troelsjohnsen started a new conversation Is It Possible To Change 'Create Resource' To 'Attach Resource'?

Lets say I have a list of users and a list of campaign code. There is a HasMany-relationship between users and campaign codes, som each user can have many campaign codes, but a campaign code can only belong to one user.

The campaign codes have been imported, as they have been created in another system.

When I set up the HasMany relationship in my User resource in Nova, I get a list of campaign codes on the view of the User. This is perfect.

The problem is, that the button says "Create CampaignCode". Instead I want to be able to attach a campaign code from the imported list of valid codes.

I have seen in the Laracon video that this functionality is available on a ManyToMany relationship. Is there anyway I can activate this function for my HasMany relationship?

12 Aug
1 year ago

troelsjohnsen left a reply on Enable Remote Access To Database Without SSH

Here the values from:

ufw status: To Action From

22 ALLOW Anywhere 80 ALLOW Anywhere 443 ALLOW Anywhere 3306 ALLOW Anywhere 22 (v6) ALLOW Anywhere (v6) 80 (v6) ALLOW Anywhere (v6) 443 (v6) ALLOW Anywhere (v6) 3306 (v6) ALLOW Anywhere (v6)

sudo netstat -ntlup | grep mysql tcp6 0 0 :::3306 :::* LISTEN 6213/mysqld

troelsjohnsen left a reply on Enable Remote Access To Database Without SSH

I am not using AWS, but I am using a server in our own data center.

I don't know that much about server configuration, but could there be something else in front of my server, that I need to configure?

troelsjohnsen left a reply on Enable Remote Access To Database Without SSH

I am actually running MariaDB (10.1.19) and has also tried following this guide: https://mariadb.com/kb/en/mariadb/configuring-mariadb-for-remote-client-access/

I have:

  1. commented out bind-address
  2. created a user with access to the database
  3. opened up port 3306 in the Forge interface

But I still get no access to the database when trying to connect from Sequel Pro using only username / password.

troelsjohnsen started a new conversation Enable Remote Access To Database Without SSH

Hi everybody,

I am trying to open up my Forge-created server to allow remote access to my MySQL-database.

I have found this previous topic and tried to follow the steps, but without any success: https://laracasts.com/discuss/channels/forge/remote-connection-to-mysql

Any of you know of any guides on how to open up remote access (without SSH) to the MySQL database?

19 Feb
4 years ago

troelsjohnsen started a new conversation [L5} Validator Method Does Not Exist

Hi!

I just experienced a problem where registration worked locally running on Homestead, but when trying to execute on my test-server (setup by Forge) I experienced an error where the auth controller couldn't find validator method on $this->registrar.

I tried changing the import at the top from

use Illuminate\Contracts\Auth\Registrar;

to

use App\Services\Registrar;

This resolved the issue. But am I experiencing a bug here or why doesn't the Registrar object resolve correctly on my server?

/Troels

22 Dec
4 years ago

troelsjohnsen left a reply on Where Are You All From?

Copenhagen, Denmark

16 Dec
4 years ago

troelsjohnsen left a reply on How To Set A Cookie With Laravel 5?

I ended up doing this

 use Illuminate\Cookie\CookieJar;
 public function index(CookieJar $cookieJar, Request $request)
 {
     if($request->referrer){
        $cookieJar->queue(cookie('referrer', $request->referrer, 45000));
     }

     return view('welcome');
 }

This also worked

$response = new \Illuminate\Http\Response(view('welcome'));
$response->withCookie(cookie('referrer', $request->referrer, 45000));
return $response;

But the other solution looks cleaner. Thanks for your help :-)

troelsjohnsen left a reply on How To Set A Cookie With Laravel 5?

This doesn't set a cookie

return view('welcome')->withCookie(cookie('test', 'test', 45000));

This does

$response = new \Illuminate\Http\Response('Test');
$response->withCookie(cookie('test', 'test', 45000));
return $response;

troelsjohnsen started a new conversation How To Set A Cookie With Laravel 5?

I am trying to figure how to set a cookie in Laravel 5. This doesn't work:

return view('welcome')->withCookie(cookie('test', 'test, 45000));

Can anyone help me? I have tried looking through the source code but can't figure it out.

15 Dec
4 years ago

troelsjohnsen left a reply on L5: Problem Routing To Cashiers Webhook Controller

I guess I'm better off just extending to my own controller :-)

Odds are that I want to implement other forms of Webhooks than what Cashier offers out of the box.

troelsjohnsen left a reply on L5: Problem Routing To Cashiers Webhook Controller

If I pick up the root it just complains about not finding:

App\Http\Controllers\\Laravel\Cashier\WebhookController

I know I'm in uncharted territory, but I am guessing something like this should be possible in L5?

troelsjohnsen started a new conversation L5: Problem Routing To Cashiers Webhook Controller

Hi,

I am building a new project using Laravel 5, Socialite and Cashier and everything is working really great. I have, however, ran into a bit of a problem with Cashier.

I am trying to enable the webhook controller according to the docs:

$router->post('stripe/webhook','Laravel\Cashier\WebhookController@handleWebhook');

The problem is, that Laravel is searching for the controller within App/Http/Controllers(/Laravel/Cashier/...)).

I have solved the issue by creating my own controller extending Cashiers webhook-controller, but I guess that Laravel should be able to understand the path in the route?

03 Dec
4 years ago

troelsjohnsen started a new conversation Laravel Cashier Creates Multiple Subscriptions

I am building a subscription service using Laravel Cashier and have run into the issue of Laravel Cashier creating multiple subscriptions for the same user and was wondering if this is intended behavior?

Executing this command multiple times for the same user will create multiple subscriptions even though Cashier only support 1:1 between User and Subscription:

$user->subscription('monthly')->create($token);

This will create orphan subscriptions in Stripe, which would be rather problematic.

29 Nov
4 years ago

troelsjohnsen left a reply on Laravel Socialite Facebook - Bad Request

So, what was the problem and how did you fix it? I am getting bad requests as well.