jcalonso

jcalonso

Member Since 5 Years Ago

Experience Points 18,945
Experience Level 4

1,055 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 278
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.

09 Aug
3 years ago

jcalonso left a reply on Function Call In Database Configuration File

@toniperic the dbname is based on the subdomain, so the db_resolver uses the $_SERVER['HTTP_HOST'] to figure out that.

05 Aug
3 years ago

jcalonso left a reply on Function Call In Database Configuration File

Thanks @d3xt3r that does the job for now.

@toniperic I'm not happy with that solution either, can you advice a better one ?

04 Aug
3 years ago

jcalonso started a new conversation Function Call In Database Configuration File

Is it possible to use a function in the configuration files (config/database.php)? it works on development but on prod the configuration is cached so the value of the function is saved but not the call to the function itself. The next time the configuration is read it uses the static value and not the function. Any ideas? Example: database.php

    'connections' => [
        'master'=> ...
        'tenant' => [
            ...
            'database' => database_name_resolver(),
        ]
    ],
10 Jul
3 years ago

jcalonso left a reply on Restore Session Data After Remember Me Auth

Yeah good idea!, I was over complicating the problem.

Cheers!

09 Jul
3 years ago

jcalonso started a new conversation Restore Session Data After Remember Me Auth

Normally when a user logs into my application I set some session variables in the AuthController->authenticated() method. The problem that I'm having is when a user has the remember me option enabled and the session expires, Laravel will re-authenticate the user but it will miss setting the session data making my application to crash since i need the data from the session.

Where is the best place to put this session logic so that it trigger in both cases (normal auth and remember me) ? I was thinking on listening to an auth event. but I'm not very sure.

Thanks in advance.

02 Jun
3 years ago

jcalonso started a new conversation Vuejs - Require Filters From An External File Using Browserify

I'm tying to tidy up my filters by extracting them into a file, this is what I currently have (but is not working), any ideas?

//main.js
...
var Filters = require('./filters.js');
new Vue({
    el: '#app',
    filters: Filters
});
//filters.js
module.exports = {
    filters: {
        aFilter: function (list, key1, key2) {
           ...
        }
    }
};
25 May
3 years ago

jcalonso left a reply on Vuejs Component With El

Thanks @kfirba , indeed I was missing the invocation and i added the inline-template to be able to use my existing DOM.

Something like this:

 <user-create inline-template>
    @include('adduser.form')
</user-create>

jcalonso left a reply on Vuejs Component With El

In the div#add-user-modal-form is that not possible ?

24 May
3 years ago

jcalonso left a reply on Vuejs Component With El

Thanks @kfirba, is true, I added the instantiation of the component and now it works fine, but in my main app, is a little bit different, im using vueify so I have something like this:

#main.js
var Vue = require('vue');
var UserCreate = require('./components/UserCreate.vue');

new Vue({
    el: '#app',
    components: {
        UserCreate: UserCreate
    }
});

the vue file:

<script>
    module.exports = {
        el: function () {
            return '#add-user-modal-form'
        },
        data: function () {
            return {
                newUser: {
                    id: '',
                    name: ''
                },
                success: false,
                edit: false
            }
        }
    }
</script>

and finally the initial html:

<html>
<body>
<div id="#add-user-modal-form">
 <label for="name">Name: {{ name }}</label>
   <input type="text" id="name" v-model="name">
    <!--  More form elements ... -->
</div>
</body>
</html>

The issue is the same, as above, Am I missing the initialization of the components too? I have other vue components that works perfectly, the only difference is that this one binds to an existing DOM instead of having a templated included in the vue file.

jcalonso started a new conversation Vuejs Component With El

I need to "attach" a component to an existing html in my page, here is a simplistic example of what I'm trying to do, the binding works but it shows the following error in the console: [Vue warn]: You are setting a non-existent path "name" on a vm instance. Consider pre-initializing the property with the "data" option for more reliable reactivity and better performance.

Vue.extend({
    el: function () {
        return '#test'
    },
    data: function () {
        return {
            name: ''
        }
    }
});

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

with this html:

<body id="app">
 <div id="test">
   <label for="name">Name: {{ name }}</label>
   <input type="text" id="name" v-model="name">
  </div>
</body>

Here a jsfiddle: https://jsfiddle.net/jcalonso/fqckabrs/ Any ideas what I'm doing wrong? I'm sure is something obvious but I cant see it. Thanks

09 Feb
3 years ago

jcalonso left a reply on How To Use Vuejs With Laravel Collective Form

You are right @nfauchelle I was more concerned on the fact that there was no v-on on my rendered DOM that I didn't test the on change event .

Thanks!

jcalonso started a new conversation How To Use Vuejs With Laravel Collective Form

I have an application where I use laravel collective form and I want to add some bits of Vue js in some forms, but I cant find a way to pass a vue directive through the form params, I imagine it gets stripped out when creating the element.

Example:

        {!! Form::select('my-select',
                        [1, 2, 3],
                         null,
                        ['v-on'=>'change:myMethod']) !!}
26 Apr
4 years ago

jcalonso left a reply on Lumen - Route With Optional Parameters

Hi again

@bestmomo true @pmall doesn seem to work either

Even normal url parameters aren't supported if I add a ?someParam=someValue the route wont match and will return 404

25 Apr
4 years ago

jcalonso started a new conversation Lumen - Route With Optional Parameters

Hello,

I'm starting new app with Lumen and I'm trying to create a route with optional parameters like this:

$app->get('user/{param?}',[
    'as'   => 'user',
    'uses' => 'App\Http\Controllers\UserController@get'
]);

And the controller:

public function get($param = null)
    {
    ...
    }

If I hit the url http://myApp.dev/user/ I get a 404

if I hit http://myApp.dev/user/something It get routed but the $param variable is null.

I was looking at nikic/FastRouter (lumen router) and I couldn't find any support for optional parameters.

Am I missing something, or there is no support for optional parameters?

Thanks!