dvdmeer

dvdmeer

Member Since 10 Months Ago

Experience Points
109,480
Total
Experience

520 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
1088
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 22
109,480 XP
Sep
17
2 months ago
Activity icon

Replied to SaaS How To Write A Clean Subscription System With Specific Functionality?

@burano You can always hang an expiry date on each software and not the product. If software goes down for maintenance it will change nothing for the expiry date of that software. So then it will be user --> Subscription --> Product --> Software -> Expiry date

And you are right that a user should not link to a product directly then. Once a user buys a subscription with one or more products you just go through all the software in the product and add an expiry date to it. You do need a separate table to store an expiration date, together with the software id and the user id in order to make sure everything is linked. When the user logs in you can check this table and find all the software + expiration dates for that particular user.

Even if you have an overlapping expiry date where it contains a product with software that is also available in another product it shouldn't matter because the product will not be available in subscription 1 but still available in subscription 2.

Sep
16
3 months ago
Activity icon

Replied to SaaS How To Write A Clean Subscription System With Specific Functionality?

So A user can only buy a product and if you add a piece of software to the product the user who subscribed to it automatically gets access to it? All you need to do then is link the user to the product and you are done. Just a many to many relationship between user and product. Just use a pivot table to link the two together.

Sep
15
3 months ago
Activity icon

Replied to SaaS How To Write A Clean Subscription System With Specific Functionality?

It seems you are doing something complicated that should not be that hard. I assume you have a user table and a user has a subscription (one-to-many - multiple users can have the same product) or you must decide that a user can have multiple subscriptions because then you will have a many to many relationship.

So a user can buy a set of software but these software packages might not be the complete product. So you are afraid that if you add something to the product then the user also has access to it because the user bought the product? To solve this you will need to link a user to the software packages and not the product. You can still display the product and all individual software packages for that product but you can then easily determine what a user is entitled to.

As for the 14 day subscription I assume you want a record of what a user bought and for how long it is valid so you have to register both records. Since each software package can be bought at a different date I think it is probably best to keep an end date per subscription and a list of software packages per subscription. Then you can quickly find out which user belongs to a subscription and which software packages belong to the user/subscription.

Activity icon

Started a new Conversation Upload Package To Local Git Server

Hi,

I watched the course "How To Create Custom Laravel Presets" and now I want to use my custom presets for a sample Laravel 6 project to see if it is working.

For some reason I am getting an error:

Loading composer repositories with package information
[email protected]'s password: 
Updating dependencies (including require-dev)         
Nothing to install or update
Writing lock file
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

In ProviderRepository.php line 208:
                                                                      
  Class 'LaraPreset\LaravelPreset\LaraPresetServiceProvider' not found  
                                                                      

Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
[email protected]:~/LaravelProjects/laravel-preset$ composer dump-autoload
Generating optimized autoload files> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

In ProviderRepository.php line 208:
                                                                      
  Class 'LaraPreset\LaravelPreset\LaraPresetServiceProvider' not found  
                                                                      

Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
[email protected]:~/LaravelProjects/laravel-preset$ 

Everything was tested in a full project before and after separating my source files and uploading them to my local git server I figured it would work.

I created a new php project and updated my composer.json file (I left out existing default lines).

In the require section I updated this:

"require": {
        "larapreset/laravel-preset": "*"
    },

I also added a repositories section:

"repositories": [
        {
            "url": "[email protected]:/git/laravel-preset.git",
            "type": "git"
        }
    ]

I see my package under vendor/larapreset so I know it is downloaded perfectly from my git server.

I tried the composer update command and composer install command; both with the same result. I also did a composer dump-autoload but no result.

Does anyone know how to fix this and what I am missing?

Sep
04
3 months ago
Activity icon

Commented on Lazy Collections

Thanks for your response. Unfortunately it was still not very clear for me since SQL cursors is a rather new concept for me. I did however find some resources that helped me further:

http://laravel.at.jeffsbox.eu/laravel-5-eloquent-builder-chunk-cursor

Which led me to:

https://en.wikipedia.org/wiki/Cursor_(databases)

So now it is much more clear for me. So using cursors decreases memory usage on the client but can increase network traffic (network round trip) and increased memory usage on the database server. And if you don't close your cursor when done it will leave a huge block of memory open until the session is closed. But still it will do a lot for application performance I think.

Thanks for pointing me in the right direction.

Activity icon

Commented on Lazy Collections

What I am curious about is if I use lazy collections and want to retrieve 3000 records and do something with them, will it then send 3000 select queries to the database if I iterate over the collection to retrieve each record?

Aug
31
3 months ago
Activity icon

Replied to How Can Integrate Element-ui With Laravel?

Guess I was missing some easy stuff. I named the component the same as an existing one. Big whoops!

Aug
30
3 months ago
Activity icon

Replied to How Can Integrate Element-ui With Laravel?

Hi,

I am also trying to get element-ui to work. I already did the following:

in "resources/assets/js/app.js" I added:

window.Vue = require('vue');

import Vue from 'vue';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

Vue.use(ElementUI);

Note that it is necessary to add the line import Vue from 'vue'; otherwise my Vue.use is not recognized.

I created my sample component

Vue.component('el-switch', require('./components/el-switch.vue').default);

And created a vue component in "resources/js/components/el-switch.vue" with the following code:

<template>
    <div>
        <el-switch
            v-model="value1"
            active-text="Pay by month"
            inactive-text="Pay by year">
        </el-switch>
    </div>
</template>

<script>
    export default {
        data() {
            return {
                value1: true,
                value2: true
            }
        }
    };
</script>

In the default "welcome.blade.php" I added the following code:

<br>
Element-UI component:<br>
<br>
<div id="app">
   <el-switch></el-switch>
</div>

And at the bottom of my body I added the following script:

<script src="{{ mix('js/app.js') }}"></script>

For some reason the Element-UI component does not show in my blade file. I use Debian 10 (Buster) and I thought that it might have to do with the default npm that is not compatible with nodejs so I installed npm 6.0.1 but I still have the same issue.

What am I missing?