janmoes

janmoes

Member Since 10 Months Ago

Experience Points
1,230
Total
Experience

3,770 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
9
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.

Level 1
1,230 XP
Feb
15
1 week ago
Activity icon

Replied to Laravel Nova-flexible-content

Yeah i practically need an online saved environment where i can store single values, which aren't repeatable. for the rest i can just use resource controllers like you said

Feb
14
1 week ago
Activity icon

Replied to Laravel Nova-flexible-content

Yeah you got a good point. One last question, if i just want to display a location or phone number, which is editable. How would you save a a single value like that in the database?

Activity icon

Replied to Laravel Nova-flexible-content

I get what you mean, but i'm thinking of something else, but for example if i also want to add images to the homepage and also show posts i now need to included 2 models within the controller to get data, i'm actually looking for a way that i can save a lot of custom data within a json object saved in just 1 database table column, so if the object is called by $data that i can just print $data->location etc

Activity icon

Replied to Laravel Nova-flexible-content

The crud page will be behind a login yes. But i'm not looking for a simple resource controller. What i'm trying to accomplish is that the user can edit for example the homepage like this: The user can choose what kind of data field he wants on his page (video, image, gallery, content). And that the user can also create repeating fields. If i use pure laravel and i want a gallery and a couple of posts on the homepage i need to include 2 models within my controller. I just want 1 admin page per front end page to add all kinds of custom content

Activity icon

Started a new Conversation Laravel Nova-flexible-content

I was looking for a flexible content solution for a laravel project. For example, if i have a HomeController and i want to show two types of content on the page, first a gallery of images and a couple of posts. i would have done this:


public function index(){
    $images = Images::all();
    $posts = Posts::all();

    return view('home')->with(compact('images', 'posts'));
}

When i was looking for a solution i found out about nova, but didn't understand the docs very well. What i'm trying to accomplish is a restricted page, where i can add/edit/delete all the content for the homepage, so images, custom text fields, adding video urls etc. Is that possible?

Feb
03
2 weeks ago
Activity icon

Replied to Best Way To Save Single Data Values To Database?

Alright, the create function which you've put in the foreach isn't needed, the create function will be in the create function of the controller. The reason i loop them through a new made array is to use the key from the database to use that as the name which contains the value. And because i don't want to loop through the custom fields in the view, i just want to place them mannually.

public function index(){
     $customFields = customField::all();
    
     $fields = [];

     foreach($customFields as $customField){
        $field[$customField['name']] = $customField['value'];
     }
   }

<p>{{$field['location']}}</p>
Activity icon

Started a new Conversation Best Way To Save Single Data Values To Database?

I'm trying to save little pieces of data to the database. For example a phone number, just a value of something i only need one of. I have written some example code to show what i want at the end but not sure if it is the best/only way:

public function index(){
     $customFields = customFields::all();
    
     $fields = [];

     foreach($customFields as $customField){
        $field[$customField['name']] = $customField['value'];
     }
   }
Oct
01
4 months ago
Activity icon

Replied to Sending An Auth Response To Vue Using Lumen

I know how those responses work, but the in between functionality is what confuses me. I want to be able to send a filled in username and password, lumen needs to check if it matches with a user in the database, if it matches, it should send back some sort of token that allowes the user to go to a restricted page in Vue

Sep
29
4 months ago
Activity icon

Started a new Conversation Sending An Auth Response To Vue Using Lumen

I'm building a Vue app which is a dynamic menu. Which means the admin can add products to the menu, and those products will be shown on a card component. Because i need to have restricted pages for the admin to add products, i'm using Lumen from Laravel, to have a simple crud api. Although the problem in my situation is: How to handle Authentication through Vue and Lumen

I already read the docs but couldn't figure out how to imply that kind of code in my Vue project.

$app->get('/post/{id}', ['middleware' => 'auth', function (Request $request, $id) {
    $user = Auth::user();

    $user = $request->user();    
}]);

I want to know what the best way is to send a response from Lumen to Vue that lets Vue know that the admin has logged in and can acces for example '/dashboard'