sahibalejandro

sahibalejandro

Member Since 5 Years Ago

Guadalajara, Jalisco, México

Experience Points 59,005
Experience Level 12

995 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 860
Lessons
Completed
Best Reply Awards 4
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 Nov
8 months ago

sahibalejandro left a reply on How To Check The CheckBox In The Modal Where Data Is Passing By Ajax.

When using $(...).val(...) you're assigning the value to the input checkbox. In order to actually check the checkbox, you have to set its checked attribute, based on the value of data.isinternetuser, something like this:

// Assuming data.isinternetuser is a boolean value.
$('#IsInternetUser').prop('checked', data.isinternetuser);

sahibalejandro left a reply on How To Use Progress Bar Based On The Filled Form In Laravel Project?

An easy way is to calculate the percentage of filled fields, for example: Total fields are 10, but only 5 fields are filled, it means you have 50% of the form filled.

percentage = (filled fields * 100) / total fields

If you want to do this with PHP you can: Create a method in your model that calculates the percentage and returns it, then you can use that value in your element.

Or if you want to do this with JavaScript you can: Assign a special class name or data-attribute to the needed fields and use document.querySelectorAll(..) to get all the fields, the length will be the "total fields" and then filter by the non-empty fields, and those will be the "filled fields" once you have these values you can calculate the percentage and update your element.

Here you can find some documentation. https://developer.mozilla.org/es/docs/Web/API/Document/querySelectorAll https://developer.mozilla.org/es/docs/Web/HTML/Elemento/progress

I hope this helps you.

sahibalejandro left a reply on Trying To Use Moment.js

Also, try to not add the entire module to your component state (the data object) because Vue will observe the module, and we don't want that.

Instead, you can use computed properties or simple methods.

07 Feb
2 years ago

sahibalejandro left a reply on Dusk Problem: DatabaseTransactions

Hi @bencarter78, I have the same error, have you solved it?

It appears that this is not reported as bug yet. (https://github.com/laravel/framework/issues)

24 Nov
2 years ago

sahibalejandro left a reply on Tabindex Or Focus Issue In Vue

When you change the route, the new component has focus on something?

sahibalejandro left a reply on Confused About Vue-router,vue-loader,vueify And Etc

You use vue-router when you want to build SPA (Single Page Applications).

You use vue-loader when you want your webpack compile *.vue files.

You use vueify when you want your browserify compile *.vue files.

You use vuex on a SPA when you need to handle a state of data across components.

18 Oct
2 years ago

sahibalejandro left a reply on Vue Hot Reloading

Hum... no updates on this? ????

26 Aug
2 years ago

sahibalejandro left a reply on Vue Hot Reloading

I just installed browserify-hmr with npm and then on my gulp file added the plugin to browserify like this:

elixir.config.js.browserify.plugins.push({
    name: 'browserify-hmr',
    options: {},
});

Then when I run gulp watch all just works!

sahibalejandro left a reply on Load Select Data With Vue.js

A Vue instance calls this hooks in order: created, beforeCompile, compiled, ready, beforeDestroy and destroy.

I did not know there is a hook called init, but I think it's better you call getTypes on the created or compiled hooks.

If you want your select to be hidden until the data is ready, you can use v-show directive combined with v-cloak to avoid "flashing" on slow connections.

Here you can find more info: http://vuejs.org/api/#v-show http://vuejs.org/api/#v-cloak

I hope this helps.

19 Aug
2 years ago

sahibalejandro left a reply on Server Render If It's A Crawler, Else Vue-router

Of course it's possible, but I don't think is a good idea because maybe you will need duplicate your vue templates as blade templates.

In the last Laracon Evan You (author of Vue.js) explains that the google crawler is smart enough to index SPAs, also says he tested it with an entire blog made with vue-router and Google was able to index it all.

sahibalejandro started a new conversation Attach File To File Input Array

Hi devs!

Is there any way to attach files to an array of file inputs?

Let's say we have this in the form:

<input type="file" name="photo[]">
<input type="file" name="photo[]">
<input type="file" name="photo[]">

Then how to attach files when testing? Ovbiously this won't work:

$this->attach('photo1.jpg', 'photo[]');
$this->attach('photo2.jpg', 'photo[]');
$this->attach('photo3.jpg', 'photo[]');

¿How can I make it works?

03 Aug
2 years ago

sahibalejandro left a reply on Package: Form Model Binding Couldn't Be Easier.

Thanks! I will really appreciate your feedback!

30 Jul
2 years ago

sahibalejandro started a new conversation Package: Form Model Binding Couldn't Be Easier.

Hi devs!

I just released a package with a bunch of blade directives to help you deal with form model binding, old input binding and validation error messages, in a clean an easy way.

The package can be found here: https://github.com/sahibalejandro/laravel-form-helpers

Give it a try!

22 Feb
3 years ago

sahibalejandro left a reply on Submitting Form With Ajax,data Are Saved To Database Successfully,but Fail() Run

hum... I think it fails because the location.href, it should be window.location.href.

01 Nov
3 years ago

sahibalejandro left a reply on Browserify And Multiple Entry Points

Well... here's how I did it.

First: npm install factor-bundle --save (or --save-dev, it depends on your needs)

Then gulpfile.js:

var elixir = require('laravel-elixir');

// Add factor-bundle to browserify plugins
elixir.config.js.browserify.plugins.push(
    {
        name: 'factor-bundle',
        options: {
            outputs: ['public/js/entry-point-1.js', 'public/js/entry-point-2.js']
        }
    }
);

elixir(function(mix) {

    mix.browserify(
        // Entry points need to be in the same order as the factor bundle outputs
        ['entry-point-1.js', 'entry-point-2.js'],
        'public/js/common.js'
    );

});

It just works! :D

21 Jul
3 years ago

sahibalejandro left a reply on Codeception Laravel Module - No Flash Mesages After Update

I have the same problem using Laracast's flash messages, no messages are flashed when runnig test. :( The weird thing is that I have codeception 2.1.0, using the module Laravel5, and the same problem occurs even for acceptance tests.

18 Jul
4 years ago

sahibalejandro left a reply on File Upload Unkown Error With Phpunit

Hi guys, any updates?

14 Jul
4 years ago

sahibalejandro started a new conversation Gulp! "concatenate" Multiple Read Streams Into Single One?

Let's say I have 3 readable streams, but I don't want to write 3 different files, instead I want to write just one file with the contents of all streams.

It's possible?

I have tried with module merge-stream but when I write to file, each stream overwrite it, and I need append the contents.

13 Jul
4 years ago
12 Jul
4 years ago

sahibalejandro left a reply on File Upload Unkown Error With Phpunit

I think is_uploaded_file() fails because the upload is not in the same HTTP request or something like that, also move_uploaded_file() fails for the same reason, that's why UploadedFile uses a $test flag.

The trick here is how to pass true to that flag from Laravel when runnin in testing env? Or maybe there is something wrong with Laravel when make the HTTP request with attachments on testing env?

It's very weird that Laravel offers this methods to attach files and they don't work... and I think it never worked before with the new integration testing.

So... any clues? Don't let this topic die, we need a solution.

sahibalejandro left a reply on File Upload Unkown Error With Phpunit

I have the exact same problem, is the same if using submitForm(...) or attach(...).

have you solved it?

25 Jun
4 years ago

sahibalejandro left a reply on Browserify And Multiple Entry Points

I think the question would be... ¿how to use `factor-bundl with elixir?

sahibalejandro left a reply on Browserify And Multiple Entry Points

Ok, I'll try to explain...

I've working with browserify, writing my own modules and make the bundle.js like normally, but when I need some module run only on a specified page (let's say login page), I have to declare window.login = require('login'); on my main.js (entry point) in order to call login.start() only on that login page and keep all modules on bundle.js

Then I found this option for browserify: https://github.com/substack/node-browserify#plugins but I don't know how to do that with elixir.

sahibalejandro started a new conversation Browserify And Multiple Entry Points

Hi, I can't figure out how to do this with elixir (L5.1)

I need a main js file, with a common code that need to run on every single page of my site, and also I need another js file to use only on a specified section, let's say login.

I searched around the web, seems like I need to use multiple entry points for browserify, but I really don't know how to do this with elixir form Laravel 5.1 :(

21 Mar
4 years ago

sahibalejandro left a reply on [L5] Package With Other Service Providers.

Yes, you can register providers within your own service provider. Just remember register other service providers on the register() method, and facades on boot() method.

Then, for example, to register HTML service provider

$this->app->register('Collective\Html\HtmlServiceProvider');

And for a facade

AliasLoader::getInstance()->alias('Form', 'Collective\Html\FormFacade');

sahibalejandro left a reply on [L5] Package With Other Service Providers.

The thing is my package is a tool to help developers build custom administration panels, so I'm using stuff like form model binding, intervention image and flash messaging (with Laracasts/Flash).

As you may know these packages has their own service providers.

I guess the best choice for the users is to not register all these service providers manually, and then on the package's documentation specify which service providers and facades are already registered to use, just to let know the user if he need it.

sahibalejandro started a new conversation [L5] Package With Other Service Providers.

I'm developing a package for L5, it depends on another few packages that has their own service providers and facades.

Is a good idea register these other services providers and facades on my own package's service provider? or force the user to that manually on config/app.php?

20 Mar
4 years ago

sahibalejandro left a reply on Lots Of Similar Controllers?

I'm developing a package for that same reason, I hope finish it in a couple of days.

The basic idea is make a base controller and just extend for each model/repository.

I'll back and share the package on packagist when it's done. :)

19 Mar
4 years ago

sahibalejandro left a reply on Multiple Authentication In Laravel 5 - PhpCAS And Default Auth

@ramonackermann Ok, I will not make a pull request to Olliread, and I also ended up with the same conclusion about danielcoimbra's approach.

I'm trying with your code right now.

sahibalejandro left a reply on Multiple Authentication In Laravel 5 - PhpCAS And Default Auth

People, I have received the zip from @makos, I'll test it today.

Also the fork of @ramonackermann seems to work. Hey @ramonackermann have you made a pull request to Ollieread?

Right now I'm trying another approach using auth contexts with a middleware changing the auth.* config on the fly, based on this gists by danielcoimbra: https://gist.github.com/danielcoimbra/64b779b4d9e522bc3373

Stay tuned.

sahibalejandro left a reply on Multiple Authentication In Laravel 5 - PhpCAS And Default Auth

I'm trying to make multiauth work with L5 but I'm stuck...

@mako can you share your entire package code with me? Just zip it and send.

I'll have time to make the pull request to ollieread repo, but need your code.

18 Mar
4 years ago

sahibalejandro left a reply on Should I Add Published Vendor Files To Vcs?

You can publish them and use .env file to assign their values when you don't want to push sensitive data to repo.

10 Mar
4 years ago

sahibalejandro left a reply on Laravel 5 Posting Javascript To Controller Won't Work

Maybe it's the last comma on the data object you are posting, some navigators (or depends on JS version) don't allow "comma last" style.

Just remove the last comma like this: $.post(URL_ROOT + 'testhuhu', { '_token': $('meta[name=csrf-token]').attr('content'), 'newLat': newLat, 'newLng': newLng }

sahibalejandro left a reply on Anybody Using Multiauth Plugin Have Luck Upgrading To 5.0?

It's planned, but no news at this time. You can follow this issue on GitHub https://github.com/ollieread/multiauth/issues/86

02 Feb
4 years ago

sahibalejandro left a reply on Player Issues On Desktop And Tablet Devices

I have Chrome on OS X and player speed works fine, so I think is related to navigator support and no a bug on the site.

08 Nov
4 years ago

sahibalejandro left a reply on Eloquent Vs Doctrine

You can use HHVM, It seems that Laravel and Doctrine2 are 100% supported by HHVM, check this out: http://hhvm.com/frameworks/

05 Nov
4 years ago

sahibalejandro left a reply on Codeception + Laravel4 = PDOException

Haha, I discover it by intuition. Thanks!

sahibalejandro left a reply on Codeception + Laravel4 = PDOException

I found the problem!

I'm using .env files to store database credentials, I had to create the file .env.testing.php and now it works.

sahibalejandro left a reply on Codeception + Laravel4 = PDOException

Yes.

In fact, the test does not have any database access, is just a $I->amOnPage('/');

sahibalejandro started a new conversation Codeception + Laravel4 = PDOException

Hi all, I need help.

As soon as I add the Laravel4 module to functional.suite.yml, no matter what when I run the tests, I get the error "PDOException No such file or directory", even if the Db module is not loaded.