Elenktik

Elenktik

Member Since 2 Years Ago

Experience Points
15,540
Total
Experience

4,460 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
130
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 4
15,540 XP
May
26
6 days ago
Activity icon

Replied to Vue Js Multiselect How To Pass Selected Values To The RegisterController?

For those who have objects with multiple attributes, this may help: https://stackoverflow.com/a/62031878/2311074

May
24
1 week ago
Activity icon

Replied to How To Setup MySQL Connection On Ubuntu (so I Can Use Docker)?

@mkshingrakhiya Okay that would be what I have to put in my .env file, right? But how can I connect to MySql that booted from docker? Either by terminal, or through PhpMyAdmin

Activity icon

Replied to How To Setup MySQL Connection On Ubuntu (so I Can Use Docker)?

@bugsysha I would like to connect to the MySQL app that I have just booted with docker. So that I can create databases etc. Either by terminal, or through PhpMyAdmin

May
21
1 week ago
Activity icon

Started a new Conversation How To Setup MySQL Connection On Ubuntu (so I Can Use Docker)?

I want to use DOCKER for my local development.

I found this guest-spotlight video which seems to be exactly for this usecase: https://laracasts.com/series/guest-spotlight/episodes/2

However, at min 04:00 he is using a commercial software called TablePlus to create a new MYSQL Connection. I have "mysql" installed, but I don't know how to setup a connection with docker.

Until now, I used Laravel Homestead and PHPMyAdmin to manage my tables.

Does anyone know how to setup a MySql Connection in Ubuntu without using TablePlus?

May
19
1 week ago
Activity icon

Commented on The Gilded Rose Kata

Hey Jeffrey, very cool - thank you! In the docs of the kata its described to not change the properties of the item class:

However, do not alter the Item class or Items property as those belong to the goblin in the corner who will insta-rage and one-shot you as he doesn't believe in shared code ownership

Here is my attempt doing it the other way around. I just added custom filters in the tick method: https://github.com/iwasherefirst2/gilded-rose-kata

May
17
2 weeks ago
Activity icon

Commented on Programming Katas Explained

Amazing :D

Activity icon

Commented on Liskov Substitution

I was just about to post the same :)

May
14
2 weeks ago
Activity icon

Commented on Object-Oriented Forms: Part 1

Just for everyone trying to do this with VUE2. The part where Jeffrey uses @keydown to delete an entry with delete this.errors[field] will not update the dom in Vue2. Instead one has to use Vue.delete(this.erros,field). See https://vuejs.org/2016/02/06/common-gotchas/

Apr
21
1 month ago
Activity icon

Commented on Server-Fetched Partials

The problem with partials and tests is that they are not encoded (they have no meta info like a html document: ). So if you try something like assertSee the random generated Username may be something like Curstis D'Amore. Thus, I think if testing for particials is awkward anyway, one may just enjoy the benefits of vue

Apr
09
1 month ago
Activity icon

Replied to Laravel And Nuxt - Do I Need To Decouple?

Did you find a solution? I am in a same spot as you, I have a Laravel/jQuery app and I would like to switch to Vue.js with SSR to keep good SEO.

There is a package for Laravel+Vue+SSR here and a great article here. However, the downside seems to be that one can't use the Laravel Blade engine.

I am looking for a solution where I can use the Blade engine like this:

<div id="app">
            <navigation>
                <nav-item>@lang('Home')<nav-item>
                <nav-item>@if(Auth::check())@lang('Dashboard')@else @lang('Login') @endif </nav-item>
            <navigation>
            @yield('content')
            <flash message="{{ $message }}"></flash>
</div>

but still do SSR. Is this possible with Nuxt?

Apr
08
1 month ago
Activity icon

Replied to How To Use Vue & Blade Without Flash Of Unstyled Content?

Its possible to use JS-server-side rendering, this will cause that the server does send <div>...</div> instead of <flash ..</flash>. There is a quick tutorial for it here: https://vuejsdevelopers.com/2017/11/06/vue-js-laravel-server-side-rendering/

My goal is to prevent flash of unstyled content, therefore I would like to render the JS at the server-side.

Activity icon

Replied to How To Use Vue & Blade Without Flash Of Unstyled Content?

Thank you for the answer.

Sorry I thought its not important how the Flash.vue looks. Lets use as an example the following:

<template>
<div class="message">
{{ message }}
</div>
</template>

<script>
export default {
    mounted() {
        console.log('Component mounted.')
    },
    probs: ['message']
}
</script>

<style>
.message{
	color: green;
}
</style>

My question remains, how can something like

<div id="app">
    @include('layouts.nav')
    @yield('content')
    <flash message="Hi"></flash>
</div>

be pre-rendered on the server?

In other words, how can I retrieve

<div id="app">
     ....

    <div class="message">Hi</div>
</div> 

from the server when JS is disabled.

Activity icon

Started a new Conversation How To Use Vue & Blade Without Flash Of Unstyled Content?

What I have seen in the tutorials from this site (See VUE series or bulding a forum) the way VUE is used is something like this:

<div id="app">
    @include('layouts.nav')
    @yield('content')
    <flash message="Hi"></flash>
</div>

and in app.js we got something like:

Vue.component('flash', require('./components/Flash.vue').default);

const app = new Vue({
    el: '#app',
});

By the default setup this will inject the correct DOM elements and the CSS via JS on pageload, so the page will only render, after JS has been loaded and executed, leading to a flash of unstyled content.

Laravel-mix offers the option to extract Vue styles in a separate css file, so it does not need to be injected by JS.

The only remaining problem is, that the something like <flash message=".."> needs to be replaced with some valid HTML like <div class="flash-message"><span>..</span></div>. The time it takes for JS to replace it, will lead to a flash of unstyled content.

I found that this package https://github.com/spatie/laravel-server-side-rendering allows server-side JS rendering, so when the page loads, the DOM and CSS should be correct, before JS takes place. But instead of the above <div id="app">..</div> one has to use {!! ssr('js/app-server.js') !!}.

If I understand it correctly, then this implies that for every page, the complete content has to be written in a vue file and one can't use blade syntax anymore.

Am I missing anything? If I have to write every site into a vue file, than I cannot only use blade syntax, there will be also no point of passing values from controller to the view - this can't be right?

I noticed that even laracast.com is using some server-side-rendering for VUE, because if I load the page with JS disabled, I will still see the page with all the correct DOM-Elements - however, I cannot image that Jeffrey has stopped using Blade engine for SSR?

So my question is basically, how can I use Vue & Blade with pre-rendered DOM elements, to avoid flash of unstyled content?

Apr
07
1 month ago
Activity icon

Commented on Practical Component Exercise #3: Tabs

Well the benefit is, next time you want to add tabs to you website the only thing you have to do is adding:

 <tabs>
       <tab name="Test">Example</tab>
       <tab name="Test 2">Example2</tab>
</tabs>

which is really short. Also this is more readable code when you read over it again in a couple of months.

Lastly, there are many VUE frameworks out there, that have all kinds of components, also for tabs. So when using a framework, you just use the code as above and you don't have to write everything yourself.

Apr
01
2 months ago
Activity icon

Replied to Use Vimeo Only For Authenticated Users?

Hi, yeah thats how you authenticate in Laravel, this is the same that tisuchi suggested. My question was, if there is some authentication between Laravel and Vimeo, because if someone got the URL you can't prevent them from watching the video. I was asking for another layer of security.

Activity icon

Replied to Use Vimeo Only For Authenticated Users?

@deekshith I contacted Vimeo and it seems that there is no solution to this problem. You can try it on laracast as well. If you logout but copy an iframe with the inspection tool, then you can watch the videos here without beeing a member.

Jan
20
4 months ago
Activity icon

Commented on Wrap Existing Tools Into Components

It this good practice? Doesn't it load the css from flickery over js? In this case, the user may see a broken page until its fully loaded?

Activity icon

Commented on This Is Laravel Mix

I wonder, is there a way to extract the css from all components into one single css file? I would like to avoid that the style snippets for each component are loaded through js..

Jan
10
4 months ago
Activity icon

Commented on Vue Component Responsibility

Wow that is beautiful!

Activity icon

Commented on Testing Vue: Part 1

Is there a part 2 in planning? There seems to be some build-in testing with vue now : https://vuejs.org/v2/guide/unit-testing.html

Jan
06
4 months ago
Activity icon

Commented on Object-Oriented Forms: Part 3

I think its funny how he states at 1:11 "we catch then", confused me at first :D

Jan
03
4 months ago
Activity icon

Commented on Webpack And Vue-cli

In 2020 webpack.config does not exists anymore in cli, its generated on the fly. I still did not get the difference between vue-cli and vue-loader.

Dec
30
5 months ago
Activity icon

Started a new Conversation Is Redundance In Class Names Bad?

In the podcast https://laracasts.com/podcast/32768 Jeffrey mentioned that suffixes are usually not needed, because they are redundant, for example he said he would not recommend to use the suffix Interface or Exception:

However I wonder, what is the alternative? For example in the Carbon package, we have a Carbon\CarbonInterface, but you cant drop the suffix, because Carbon\Carbon is already used. Also it seems that its recommended to use Interface key as suffix and Abstract key as prefix here: https://www.php-fig.org/bylaws/psr-naming-conventions/

Another thing I noticed, is that repetition accurs often in Laravel. For example, all Controller have a Controller suffix: App\Http\Controllers\CarController etc and this is also something Jeffrey does in his videos. Also the exceptions in Laravel are suffixed with Exception in the documentation: https://laravel.com/docs/6.x/errors#renderable-exceptions

So I wonder, whats the rule of thumb when to use a suffix and when not?

Dec
27
5 months ago
Activity icon

Replied to Is There A Podcast Playlist?

@nakov I see, unfortunately I do not use apple, I am on Ubuntu

Activity icon

Started a new Conversation Is There A Podcast Playlist?

Hey I just started to listen to the podcast starting on episode 1. At the moment, whenever I finished an episode, I have to scroll down about 100 episodes to click the next one. Is there something like an auto-playlist, that will just automatically play the next episode?

Dec
23
5 months ago
Activity icon

Replied to Change Email Markdown Theme At Runtime

Since Laravel 5.5 you may specifiy the theme you want to use in the mailable class like this:

protected $theme = 'my-theme';

you may read more about it here

Dec
13
5 months ago
Activity icon

Replied to Use Vimeo Only For Authenticated Users?

Yes of course, thats how to set it up. My issue is, that anyone who has the vimeo url can still watch it if he manually inserts an iframe with inspection tool.

Dec
11
5 months ago
Activity icon

Started a new Conversation Use Vimeo Only For Authenticated Users?

Hey, I uploaded a video to Vimeo and checked " hide video from Vimeo". I also whitelisted my domain. The video can now only be watched if it is embed on my website.

However, how I can make sure that only authorized users may watch it? Currently, anyone who visits my website and knows the url of my private video, could watch it, simply by using the browser-inspector tool and copy/paste an iframe with the url. Is there a way to make sure a user is authenticated before showing the video?