alex_time

alex_time

Member Since 3 Years Ago

Experience Points 36,615
Experience Level 8

3,385 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 466
Lessons
Completed
Best Reply Awards 0
Best Reply
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    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 Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

11 Feb
1 week ago

alex_time left a reply on Laravel 5.7 TDD Routes Flushed After First Test Method Executed

The problem was caused by the fact the I have multiple routes file that are required using require_once.

Now I have organized routes file in folder creating specific methods on RouteServiceProvider.

Thanks

alex_time left a reply on Laravel 5.7 TDD Routes Flushed After First Test Method Executed

If I try to avoid the named route on the second method and post a url I get a NotFoundHttpException, and after that I realized that almost all routes are flushed after the first test method executed.

alex_time left a reply on Laravel 5.7 TDD Routes Flushed After First Test Method Executed

public function test_1() { $this->assertTrue(true); $this->post(route('routename'), [])->assertStatus(404); }

public function test_2() { $this->assertFalse(false); $this->post(route('routename'), [])->assertStatus(404); }

PASS

vendor/bin/phpunit tests/Feature/BasicTest.php --filter=test_1

PASS

vendor/bin/phpunit tests/Feature/BasicTest.php --filter=test_1

#ERROR

vendor/bin/phpunit tests/Feature/BasicTest.php

Route [routename] not defined

alex_time started a new conversation Laravel 5.7 TDD Routes Flushed After First Test

I am facing a strange behavior trying to explore the TDD world. I have made two tests on the same class, each test is isolated from others, in fact if I need a user logged in I have to log a user in every test method.

Here the issue: after the first test method (passed), where I can query routes as many time as I need (and I also can post or get or patch as many time I need), trying to use a named route on a second test fails. Trying to understand why I noticed that all the routes ara flushed after the first test method and I cannot resolve any routes after the first test method.

If I try to filter the test method to execute, in that case the test work (and pass) with no problem, indicating that there is no issue with the test method itself but who the usage of that test method only after a call the the very first.

28 Oct
2 years ago

alex_time left a reply on Cannot Get Data Posted By Vue Js Generated Fields

Oh my Goodness! I now actually see the nested form! Sorry guys! It is unbelievable that after one day looking at that form I now see the second form inside the template! Sorry! Sorry! Sorry!

alex_time left a reply on Cannot Get Data Posted By Vue Js Generated Fields

@edoc On my local environment I post the form to a Laravel post route and dd($_POST), what I get is only:

array:3 [▼
  "_token" => "dg04kWWGDm4Iyxe32j7Kb6FGTNNWf99sXVpPcXuY"
  "progressive_number" => ""
  "note" => ""
]

alex_time left a reply on Cannot Get Data Posted By Vue Js Generated Fields

Even if I move the template outside the form (if this is what you meant when you said that forms can't be nested), I can't get the data posted. Can you please be more clear about the mistake I make?

alex_time left a reply on Cannot Get Data Posted By Vue Js Generated Fields

Why nested? There is only one form. What should I change to make it work again?

And as I said, the strange thing is that that very same cod worked until the 26th of October.

27 Oct
2 years ago

alex_time left a reply on Cannot Get Data Posted By Vue Js Generated Fields

This is the template that actually works, I am using Vue 1.0.20

When I submit the form containing this component I can no longer access data on the $_POST global array (nor the request laravel class)

<order-rows
        articles="{{ $articleObjects }}"
        vat_codes="{{ $vatCodeObjects }}"
        old_rows="{{ $oldRows }}"
        old_unconditional_discount="{{ $oldUnconditionalDiscount }}"
>
</order-rows>

<template id="order-rows_template">
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">{{ trans('labels_Article.articles') }}</h3>
        </div>
        <div class="panel-body text-right">

            <form class="form-group">
                <div v-for="row in rows">
                    <table>
                        <thead v-if="$index == 0">
                        <tr>
                            <th>
                                <div class="btn-group btn-group-sm" role="group" aria-label="{{ trans('labels.code') }}">
                                    <button type="button" class="btn btn-default" :disabled="! compileRowsByCode" @click="toggleCompileRowByCode(row)">{{ trans('labels.code') }}</button>
                                </div>
                            </th>
                            <th>
                                <div class="btn-group btn-group-sm" role="group" aria-label="{{ trans('labels_Article.article') }}">
                                    <button type="button" class="btn btn-default" :disabled="compileRowsByCode" @click="toggleCompileRowByCode(row)">{{ trans('labels_Article.article') }}</button>
                                </div>
                            </th>
                            <th>{{ trans('labels.qty') }}</th>
                            <th>{{ trans('labels.unit_price') }}</th>
                            <th>{{ trans('labels.partial_price') }}</th>
                            <th>{{ trans('labels.max_discount') }}</th>
                            <th>{{ trans('labels.price_plus') }}</th>
                            <th>{{ trans('labels.discount') }}</th>
                            <th>{{ trans('labels.total_price') }}</th>
                            <th>{{ trans('labels.total_price_unconditional_discount') }}</th>
                            <th>{{ trans('labels.standard_agent_commission') }}</th>
                            <th>{{ trans('labels.applied_agent_commission') }}</th>
                            <th>{{ trans('labels.vat') }}</th>
                            <td></td>
                        </tr>
                        </thead>
                        <tr>
                            <td>
                                <input type="hidden" name="rows[@{{ $index }}][article_periodicity_id]"
                                       v-model="row.article_periodicity_id">
                                <input type="hidden" name="rows[@{{ $index }}][max_workers]" v-model="row.max_workers">
                                <input type="hidden" name="rows[@{{ $index }}][task_template_id]"
                                       v-model="row.task_template_id">

                                <input
                                    type="hidden"
                                    name="rows[@{{ $index }}][article_code]"
                                    v-model="row.article_code"
                                >
                                <select
                                    v-model="row.article_code"
                                    v-selecttwo="row.article_code"
                                    class="form-control"
                                    :disabled="! compileRowsByCode"
                                >
                                    <option value="">{{ trans('labels.selectOne') }}</option>
                                    <option v-for="article in articles | orderBy 'code'" v-bind:value="article.code">
                                        @{{ article.code }}
                                    </option>
                                </select>

                            </td>

                            <td>
                                <input
                                        type="hidden"
                                        name="rows[@{{ $index }}][article_name]"
                                        v-model="row.article_name"
                                >
                                <select
                                        v-model="row.article_name"
                                        v-selecttwo="row.article_name"
                                        class="form-control"
                                        :disabled="compileRowsByCode"
                                >
                                    <option value="">{{ trans('labels.selectOne') }}</option>
                                    <option v-for="article in articles | orderBy 'code'" v-bind:value="article.name">
                                        @{{ article.name }}
                                    </option>
                                </select>
                            </td>

                            <td>
                                <input type="text" name="rows[@{{ $index }}][quantity]" v-model="row.quantity"
                                       class="form-control" placeholder="{{ trans('labels.qty') }}" @keyup="
                                updateRowValues(row)" v-bind:class="{ 'alert-danger': rowQuantityIsNotValid(row) }">
                            </td>

                            <td>
                                <input type="text" name="rows[@{{ $index }}][unit_price]" v-model="row.unit_price"
                                       class="form-control" placeholder="{{ trans('labels.unit_price') }}" readonly>
                            </td>

                            <td>
                                <input type="text" name="rows[@{{ $index }}][partial_price]" v-model="row.partial_price"
                                       class="form-control" placeholder="{{ trans('labels.partial_price') }}" readonly>
                            </td>

                            <td>
                                <input type="text" name="rows[@{{ $index }}][max_discount]" v-model="row.max_discount"
                                       class="form-control" placeholder="{{ trans('labels.max_discount') }}" readonly>
                            </td>

                            <td>
                                <input type="text" name="rows[@{{ $index }}][price_plus]" v-model="row.price_plus"
                                       class="form-control" placeholder="{{ trans('labels.price_plus') }}" @keyup="
                                updateRowValues(row)" v-bind:class="{ 'alert-danger': rowPricePlusIsNotValid(row) }">
                            </td>

                            <td v-bind:class="{ 'has-error': rowDiscountIsNotValid(row) }">
                                <input type="text" name="rows[@{{ $index }}][discount]" v-model="row.discount"
                                       class="form-control" placeholder="{{ trans('labels.discount') }}" @keyup="
                                updateRowValues(row)" v-bind:class="{ 'alert-danger': rowDiscountIsNotValid(row) }">
                            </td>

                            <td>
                                <input type="text" name="rows[@{{ $index }}][total_price]" v-model="row.total_price"
                                       class="form-control" placeholder="{{ trans('labels.total_price') }}" readonly>
                            </td>

                            <td>
                                <input type="text" name="rows[@{{ $index }}][total_price_unconditional_discount]"
                                       v-model="row.total_price_unconditional_discount" class="form-control"
                                       placeholder="{{ trans('labels.total_price_unconditional_discount') }}" readonly>
                            </td>

                            <td>
                                <input type="text" name="rows[@{{ $index }}][standard_agent_commission]"
                                       v-model="row.standard_agent_commission" class="form-control"
                                       placeholder="{{ trans('labels.standard_agent_commission') }}" @keyup="
                                updateRowAppliedAgentCommission(row)" v-bind:class="
                                { 'alert-danger': rowStandardAgentCommissionIsNotValid(row) }">
                            </td>

                            <td>
                                <input type="text" name="rows[@{{ $index }}][applied_agent_commission]"
                                       v-model="row.applied_agent_commission" class="form-control"
                                       placeholder="{{ trans('labels.applied_agent_commission') }}" readonly>
                            </td>

                            <td>
                                <select name="rows[@{{ $index }}][vat]" v-model="row.vat" class="form-control">
                                    <option v-for="vat_code in vat_codes" v-bind:value="vat_code.value">
                                        @{{ vat_code.value }}%
                                    </option>
                                </select>
                            </td>

                            <td>
                                <button type="button" class="btn btn-default" v-on:click="$parent.deleteOneRow(row)"
                                        v-if="$index > 0 || $index != rows.length-1">-
                                </button>
                            </td>
                        </tr>
                        <tr v-if="row.max_workers || row.task_template_id" transition="fade" class="animated">
                            <td v-if="row.max_workers" colspan="4">
                                <div v-for="worker in row.workers">
                                    <div class="form-group form-inline">
                                        <span class="hint--bottom" data-hint="@{{ findTaskTemplateName(row) }}"><i class="fa fa-tasks"></i></span>

                                        <label>{{ trans('labels.worker') }}</label>

                                        <input type="text"
                                               name="rows[@{{ $parent.$index }}][workers][@{{ $index }}][first_name]"
                                               v-model="worker.first_name" class="form-control"
                                               placeholder="{{ trans('labels.first_name') }}">

                                        <input type="text"
                                               name="rows[@{{ $parent.$index }}][workers][@{{ $index }}][last_name]"
                                               v-model="worker.last_name" class="form-control"
                                               placeholder="{{ trans('labels.last_name') }}">

                                        <label>{{ trans('labels.alternative_date') }}</label>
                                        <input type="date"
                                               name="rows[@{{ $parent.$index }}][workers][@{{ $index }}][worker_task_start_date]"
                                               v-model="worker.worker_task_start_date" class="form-control">

                                        <button type="button" class="btn btn-default" v-on:click="addOneWorker(row)"
                                                v-if="$index == row.workers.length-1">+
                                        </button>
                                        <button type="button" class="btn btn-default"
                                                v-on:click="$parent.deleteOneWorker(row, worker)"
                                                v-if="$index > 0 || $index != row.workers.length-1">-
                                        </button>
                                    </div>
                                </div>
                            </td>
                            <td v-else colspan="4">
                                <div class="form-group form-inline">
                                    <span class="hint--bottom" data-hint="@{{ findTaskTemplateName(row) }}"><i class="fa fa-tasks"></i></span>

                                    <label>{{ trans('labels.alternative_date') }}</label>
                                    <input type="date" name="rows[@{{ $index }}][task_start_date]"
                                           v-model="row.task_start_date" class="form-control">
                            </td>
                            <td colspan="8"></td>
                        </tr>
                        <tr>
                            <td colspan="12">
                                <button type="button" class="btn btn-default" v-on:click="addOneRow()"
                                        v-if="$index == rows.length-1">+ {{ trans('labels.addRow') }}</button>
                            </td>
                        </tr>
                    </table>
                </div>

                <hr>

                <div class="form-inline">
                    <div class="form-group">
                        <label for="net_total">{{ trans('labels.net_total') }}</label>
                        <input type="text" name="net_total" v-model="net_total" class="form-control text-right"
                               readonly>
                    </div>
                </div>
                <div class="form-inline">
                    <div class="form-group">
                        <label for="unconditional_discount">{{ trans('labels.unconditional_discount') }}</label>
                        <input type="text" name="unconditional_discount" v-model="unconditional_discount"
                               class="form-control text-right" @keyup="applyUnconditionalDiscount()" v-bind:class="
                        { 'alert-danger': unconditionalDiscountIsNotValid() }">
                    </div>
                </div>

                <hr>

                <div class="form-inline" v-for="vat in vats">
                    <div class="form-group">
                        <label for="vats[@{{ vat.rate }}][value]">{{ trans('labels.vat') }} @{{ vat.rate }}%</label>
                        <input type="hidden" name="vats[@{{ $index }}][rate]" v-model="vat.rate">
                        <input type="text" name="vats[@{{ $index }}][value]" v-model="vat.value"
                               class="form-control text-right" readonly>
                    </div>
                </div>
                <div class="form-inline">
                    <div class="form-group">
                        <label for="total_vat">{{ trans('labels.total_vat') }}</label>
                        <input type="text" name="total_vat" v-model="total_vat" class="form-control text-right"
                               readonly>
                    </div>
                </div>

                <hr>

                <div class="form-inline">
                    <div class="form-group">
                        <label for="order_total">{{ trans('labels.total') }}</label>
                        <input type="text" name="order_total" v-model="order_total" class="form-control text-right"
                               readonly>
                    </div>
                </div>
            </form>
        </div>
    </div>
</template>

alex_time started a new conversation Cannot Get Data Posted By Vue Js Generated Fields

Since yesterday (I have not even touched my code), using Chrome and Firefox I can no longer get data posted about all the fields that are generated by vue js using a v-for directive!

Vue dev tools, before posting data, looks fine as always, with all the data ready to send, but after submitting the form all my rules validation fail and if I die and dump even the entire $_POST array all the vue js generated fields are disappeared.

Do you have any idea on what is going on?!

16 Jul
2 years ago

alex_time left a reply on Pusher Don't Recive My Events

For me the problem was the cluster that must be defined

alex_time left a reply on Pusher Don't Recive My Events

I have also tried directly avoiding event broadcasting system, like this:

$pusher = new Pusher(
        config('broadcasting.connections.pusher.key'),
        config('broadcasting.connections.pusher.secret'),
        config('broadcasting.connections.pusher.app_id'),
        array('encrypted' => true)
    );
    $data['user_id'] = 1;
    $data['body'] = 'hello world';
    $pusher->trigger('test-channel', 'event-name', $data);

But it does not work anyway.

alex_time left a reply on Pusher Don't Recive My Events

Same to me...no way to communicate to pusher from laravel. I tried to start from scratch with a new project, no log errors and no connection...

14 Jul
2 years ago

alex_time started a new conversation Valet And Eloquent Casts

Strange behavior using valet yesterday. I have a decimal type on my DB (maria Db), not unsigned, when I access it through the eloquent model (without casts) it will be converted to string but I can make math operation on it. Anyway if I make a subtraction it works only until the result it is zero, it won't go below zero. So I tried to casts to a float on eloquent model, the type will be still string and if I make a subtraction still can't go below zero... Another strange behavior is that if I echo out the result on blade all negative number will be printed between parenthesis. My locale is always the same. If I run the very same project using homestead all works fine without having to use the casts definition. Does anyone has ever experienced something like this?!

10 Jul
2 years ago

alex_time left a reply on Config/broadcasting.php File Missing

Thanks @martinbean I am coming from a previous version and I checked and followed the upgrade guide. The the guide anyway did not tell to add that specific file.

Now I am wondering if I have to update all the app file to the newer version...

Thanks again for your help, I didn't realised that during the upgrade the app directory remain untouched.

09 Jul
2 years ago

alex_time started a new conversation Config/broadcasting.php File Missing

Even if php artisan -V confirm that I'm on "Laravel Framework version 5.2.22", I cannot find the config/broadcasting.php file. Why during the upgrade that file has no been pulled in?

29 Mar
2 years ago

alex_time started a new conversation Validation On Netested Elements

Prior to update to the latest Laravel 5.2.25 I was able to validate nested fields using the * symbol. What I mean is, if I have nested fields like this: [CODE] [/CODE] I was able to validate ALL the names of each child using a single rule like this, no matter of the nested level: [CODE]'person.*.name' => 'required'[/CODE]

But now, after update to Laravel 5.2.25 the rule validation above it does not work at all like I was expecting and to make it works on the first nested level only I have to write it like this: [CODE]'person.children.*.name' => 'required'[/CODE]

I would like to restore the previous behavior, no matter how deep I am on the tree I always want the name to be required. Do you know why the validation logic has changed? And how can I restore, maybe with a custom validation, a validation that go deep to the entire tree?

11 Dec
3 years ago

alex_time started a new conversation Send Back All Inputs As Json On Error

I am playing with vue Js, I have created a simple form that allow me to clone a couple of fields over and over all the field are required and when I am redirected back by the Request class I do not know how recreate and repopulate all the fields that I have created on the fly with Vue. Is there any way to transform all the old inputs as a son object?

23 Nov
3 years ago

alex_time started a new conversation One Instance For One Task Or One For All?

All the screencast Jeffrey has made are REALLY great but, I cannot figured out a best practice about two things:

  1. When I have two or more different tasks to approach on the very same page, I would like to have one vue instance for each one, but I have problems when they are nested, my real case is: a page with a h1 title and a form, I have created a simple vue instance to bind the first form field with the h1 title so the vue "namespace" is the entire div containing h1+form+all_inputs; then I have another vue instance on a sub div element containing only two of the inputs which are related one another, but the first vue instance that "contains" the second one have precedence over the vue "child" and the child does not work, also the data property are erased by the first one, how can I solve this?
  2. I have written a couple of different vue instance on different files because I wanted to call theme according to the page that is requested by the user, but how can I load one specific vue js file only on one specific page? I am using elixir and all my scripts are merged together right now.
19 Nov
3 years ago

alex_time left a reply on Input Text Value Based On A Related Select

Thanks, @mr415, it is cleaner on vue, or at least more structured, but how can I "inject" the suggestedCommissions object on vue file from my controller? My vue code it is in another js file and not hardcoded inside the view inside a script tag. I have seen a package made by Jeffrey on github to pass data from L5 to Js (https://github.com/laracasts/PHP-Vars-To-Js-Transformer), do you think it would be a good approach? I have used it once but maybe there is a cleaner way to do that, I am a real newbie on js...

18 Nov
3 years ago

alex_time started a new conversation Input Text Based On A Related Select Property

I have a product and a category model, one product belongs to a category, the related category has a suggested_commission field and the product has a commission field.

On the view for creating a product I have to select the category (no problem) but also I need the product->commission field to be equal to the suggested_commission value based on the selected category.

My idea is to create one hidden text containing the suggested_commission value for each select option, and using jQuery I would create a onChange listener to the select, get the selected option value, get the related suggested_commission value from the hidden text and update the product.commission value, but I was wondering if there is a more elegant way to accomplish that using vue and not jQuery, and also to avoid to create one hidden input for each option, avoiding also a second Ajax request to the serve only to get the category json response from Laravel and pass the json instead with the view.

What do you think about all this stuff??P

25 Jul
3 years ago

alex_time left a reply on LiveReload On PHPStorm

I have seen that but it does not work with PHP file, only html, css and JS, while the Sublime LiveReload plugin works on PHP file too

alex_time started a new conversation LiveReload On PHPStorm

I see that Jeffrey has used a Sublime plugin on the "Mass User Settings" series, does anyone know to get the same result on PHPStorm? Does anyone has tried the LiveReload app on Mac App Store?

09 Apr
3 years ago

alex_time left a reply on Video Player, Upload And Hosting

It was a problem of account type, it is not possibile to do what I want with basic account, a plus or pro account it is necessary. thanks @erozas for your help.

08 Apr
3 years ago

alex_time left a reply on Video Player, Upload And Hosting

@erozas Before making a decision I have done some testing today, I have generated a new app on Vimeo API and a valid token to be used on my development server. I have uploaded a couple of videos and, even if I cannot still upload anything for the three business days delay I guess (this is what Vimeo says on FAQ), I can request all the videos and get the json ready to be parsed, the problem is that all the videos on Vimeo must be private (and they are right now), but they cannot be seen by the user. If I render a view that simply parse the

Vimeo::request('/me/videos', ['per_page' => 10], 'GET');

and I echo the $data['body']['data'][index]['embed']['html']

Vimeo ask the user to log in in order to view theme, while I wish Vimeo use the token (and they use it because if I delete it an exception will be thrown) to use my user as the login user, and not ask the visitor to have a Vimeo account, and even if the visitor has an account he won't see anything because of the private video.

Here in laracast all the video must be private in order to not be visibile without subscription, but laracast does not ask me to log in to vimeo in order to watch videos...so there is some concept I am missing I guess. Have you ever faced a situation like this? I thought that using the vimeo token would let the app "been seen" by Vimeo as the Vimeo user associated with the token...but I am wrong... @JeffreyWay maybe know something about all this stuff ;)

alex_time started a new conversation Video Player, Upload And Hosting

My company asked me to create an app to publish videos that must be seen by employees, so I basically have to:

  1. create an upload video system (I will not be the only one to upload video otherwise I could simply use ftp or sftp and do things manually, but for others I should create a simple web interface);
  2. track down users so to be sure that everyone has seen the entire videos that they have to;
  3. does not allow users to see videos that they cannot see.

Now I have some doubt:

  1. upload without flash mean I have to raise up values on php.ini, but is it safe to put those level so high? And even if I get more RAM on server, does exist a system to track upload progress on laravel? I have written long time ago a system to track upload progress using PHP Session upload progress, maybe I can use the same approach.
  2. I think I can do ajax request during playback to log what the user have seen, do you have better suggestion?
  3. will be better to leave videos on an external provider or upload everything on ours own server? Using our own server I think let me create temporary link to the videos so that only that user on that session can see that video, or am I wrong? Will be possible/better to create dynamic link to the real video file? But in this case that link will be available for everyone, how would you solve that?
30 Mar
3 years ago

alex_time left a reply on Conditional Form Fields

@bestmomo and all the added field were completely lost? Because this is the biggest problem on that approach. My "spaghetti-code" like classes were able to reconstruct the entire form, including all the fields added using JS and all the content and finally hide all the unnecessary fields, this is what I am trying to solve in Laravel and I do not know even where to start...

alex_time left a reply on Conditional Form Fields

@bestmomo is that page published and accessible for visit it and view all in action? When the user fails a validation rule and he's redirected back, does laravel create again all the answer fields generated by jquery?

alex_time left a reply on Conditional Form Fields

@bestmomo do you have any example to that approach? Maybe a laracast video or something that can explain more what you usually do?

alex_time started a new conversation Conditional Form Fields

Back in my spaghetti-code I written a class that could handle conditional forms, I could, for example, ask the user if he/she was a male or female and based on that choice display (using js) some specific fields and than apply conditional validation based on the choices. Switching to L5 I know I can benefit from the new validation method where I can put logic in it, and I could write specific js on assets but there is still a problem: failing a validation in L5 mean a switch back to the previous page with precompiled fields, but if I apply js code to display a subset of fields based on other fields I guess that L5 will compile all the filds that were compiled before but I cannot handle all the show/hide actions to display the form like it was before. How do you handle such situations?