keevitaja

at unemployed

Experience

56,160

21 Best Reply Awards

  • Member Since 4 Years Ago
  • 167 Lessons Completed
  • 0 Favorites

23rd April, 2018

keevitaja started a new conversation How To Ignore Specific Query Parameter With Varnish Cache? • 3 months ago

I need to cache this request with varnish, but i need to ignore the last query parameter _=1524469655019.

I am not sure how varnish internally works, but i suppose it makes the cache uid key from the url requested. So in my case it would need it only to create the uid key from this url

Doing something like req.url ~ "^/swatches/(.*)$" would not work as varnish would still use the entire url for cache uid.

19th March, 2018

keevitaja started a new conversation Test How Does A Website Handle Load • 4 months ago

Hello!

Can anyone recomment a service (paid is fine!), where i can test how does a webpage handle load. The service should be able to mock n+1 users requesting a page. Also requests must run js for any ajax request.

Not laravel spedific at all!

21st January, 2018

keevitaja left a reply on Which Linux Distro Should I Use • 6 months ago

@defji lol, check the screenshot again and read!

xfce, arc gtk theme, paper icons

11th November, 2017

keevitaja left a reply on Vue And Laravel Named Routes • 9 months ago

Use https://github.com/tightenco/ziggy to get the route() javascript helper.

keevitaja left a reply on Multilingual Apps In Laravel • 9 months ago

Hi guys, i continue my spam.

It turned out, that 2 years ago i had no clue what i was doing. I recently updated the Linguist (https://github.com/keevitaja/linguist) package. It got so much easier to use.

Most of the Laravel goodies work out of the box. You can use route() or url() and also redirections pick up the correct locale. by default.

For a bonus this package also works well with https://github.com/tightenco/ziggy .

17th October, 2017

keevitaja left a reply on Downgrading PHP 7.1 To 7.0 • 10 months ago

I have not fixed the issue. I have bunch of stuff running there and i do not want to mess everything up.

But another question is, when you create a new site with forge, will it be 7.0 or 7.1?

13th October, 2017

keevitaja left a reply on Laravel Certification. 2017! • 10 months ago

Not the employers and not the clients will ever care about this.

A certificate worth depends on the quality of the program and issuer.

When ever you can take the "test" online, the certificate becomes worthless. Those online tests can never make sure, who actually gives the answers.

So this project is 100% another way to make money!

6th October, 2017

keevitaja started a new conversation Downgrading PHP 7.1 To 7.0 • 10 months ago

Hello!

Forge does not provide any way to downgrade PHP version.

Has any of you done that before? How to do it correctly so all new sites would be 7.0

7th September, 2017

keevitaja started a new conversation Odoo Setup • 11 months ago

Hello!

I am trying to install Odoo 9 on a forge provisioned subdomain with no luck.

Has any of you done this? Service is installed and running. Just need some help with setting it up!

Thank you.

6th August, 2017

keevitaja left a reply on Laravel 5.5 And Dispatch • 1 year ago

All good.

Dispatcher->dispatchNow() is the answer

keevitaja started a new conversation Laravel 5.5 And Dispatch • 1 year ago

Hello!

5.5 dispatch() helper returns PendingDispatch class instead of the jobs handle methods return value. Is it possible to get the handle return value like it was implemented in 5.4?

1st August, 2017

keevitaja started a new conversation Mysql: Multiple Tables Join • 1 year ago

Hello!

I have 2 tables:

entities:

id

statuses:

id
entity_id
status

Each entity can have many statuses and i need to select only the entities that have 'paid' status and do not have 'cancel' status. How do i do a proper join for that?

Not using eloquent, but raw queries.

6th May, 2017

keevitaja left a reply on Reloading A Dynamic VueJs Component • 1 year ago

<component :is="view" :key="key"></component> does the trick

keevitaja started a new conversation Reloading A Dynamic VueJs Component • 1 year ago

anyone knows how to reload a #vuejs dynamic component?

<component :is="view"></component>

reassigning does not do the trick!

16th April, 2017

keevitaja left a reply on Localization Tips For Project With Dynamic Content. • 1 year ago

@oten @dashty

Check out these packages:

https://github.com/keevitaja/linguist https://github.com/dimsav/laravel-translatable

The first package is for the routing. All it does is it removes the locale slug from the REQUEST_URI and defines locale as a constant which will be used in the configuration file. It is so simple, that you can actually copy the code from

https://github.com/keevitaja/linguist/blob/master/src/Http/Kernel.php#L31

and use it in your index.php or just paste the kernel file.

The second package gives you the eloquent support. Through you have to design your app from ground to support the laravel translatable package.

7th February, 2017

keevitaja left a reply on Allow Remote Mysql Access • 1 year ago

nono, i need to change firewall settings

keevitaja started a new conversation Allow Remote Mysql Access • 1 year ago

Hello!

How do i allow remote mysql access on a forge provisioned server?

PS! I know that is not secure!

8th January, 2017

keevitaja started a new conversation Getting Ajax Call Db Queries Into Laravel Debubar • 1 year ago

Hello!

Is it possible to get Laravel debugbar display also db queries that are executed by ajax calls?

keevitaja started a new conversation Change The Route Variable Name • 1 year ago

Hello!

Is it possible to change the route variable name?

Route::resource('invite', 'Account\InviteController') will create account/invite/{invite} but i need it to be account/invite/{account}

3rd January, 2017

keevitaja left a reply on Change The Url Of The Password Reset Link Send By Broker • 1 year ago

This has nothing to do with the reset link send by email to the user. I need to change url in the mail.

keevitaja started a new conversation Change The Url Of The Password Reset Link Send By Broker • 1 year ago

Hello!

How can i change the url of the password reset link sent out by password broker?

The default is password/reset/<token> but i need something else.

30th December, 2016

keevitaja left a reply on Laravel 5.4 And Axios • 1 year ago

does axios attach ajax headers by default?

20th December, 2016

keevitaja started a new conversation Render Ajax Loaded Vue Components? • 1 year ago

Hello!

I have situation, where my-form components gets some html via ajax get call, which has another vue component in it, and i pass it to dom. But this is not working, as the component from the ajax will not be rendred once injected into the dom.

Is there a simple workaround for this?

17th December, 2016

keevitaja started a new conversation Communications Between Components • 1 year ago

<my-parent>
    <my-child></my-child>
    <my-child></my-child>
    <my-child></my-child>

Is it possible to "register" these child components in parent component so i could manipulated children properties?

I tried with mounted() to add the child instance to parent property, but it will not be reactive.

9th December, 2016

keevitaja started a new conversation How To Get Vue Components Actual Height • 1 year ago

Hello!

This is probably more general javascript+css question. But maybe vue has some nice workaround.

I have a tabs component with inline template. And i need to get the actual height of the component. Is it doable at all?

https://jsfiddle.net/3tao4rsf/

4th December, 2016

keevitaja left a reply on Disable ES5 Transpiler In Elixir Webpack • 1 year ago

scripts will only concatenate. It does not bundle dependencies.

3rd December, 2016

keevitaja started a new conversation Disable ES5 Transpiler In Elixir Webpack • 1 year ago

Hello!

Is it possible to disable transpiler in Elixir? Like it would still have to bundle, but not transpile.

I am building project where only latest firefox and chrome are targeted. Do i need to transpile the ES6 syntax to ES5 at all? Project is using other technologies as well that are not supported by IE.

28th November, 2016

keevitaja started a new conversation Elixir Cannot Transpile ES6? Seriously? • 1 year ago

Hello!

I might be wrong... and i hope i am. But elixir does not know how to transpile for of loops.

Some suggest it has to do something with using nodes buble instead of babel.

Any way to fix this issue?

keevitaja left a reply on Laravel Elixir Error When Using For ... Of • 1 year ago

Any clue how to use babel instead of this buble?

26th November, 2016

keevitaja started a new conversation How To Bundle Font Awesome With Elixir And Webpack • 1 year ago

Hello!

Is it possible to bundle Font Awesome, and other dependencies, into the main.js file?

If yes, then how?

24th November, 2016

keevitaja left a reply on Passing Variable Data From Dom Content To Vue Data Object • 1 year ago

Thanx. I considered this approach too, but for me it seemed like a minor hassle.

I am almost certain, i got it working with html data attribute

<span v-for="item in repo.test" data-repo='{"test": {"1": "one", "2": "two"}}'>
    {{ item }}    
</span>

and in my js file i do

let repo = {}

for (let element of document.querySelectorAll('[data-repo]')) {
    let data = JSON.parse(element.getAttribute('data-repo'))

    for (let i in data) repo[i] = data[i]
}

const App = new Vue({
    el: '#vue-app',
    data: {
        repo: repo
    },

The idea is, i can inject data from anywhere. If anyone has tried this approach and in the end ran into some trouble, please let me know.

keevitaja started a new conversation Passing Variable Data From Dom Content To Vue Data Object • 1 year ago

Hello!

What is the best option to pass data to vue object?

<span v-for="item in [1,2,3,4,5]">

This array is created by php. I would need later to modify the array. Like add/remove items.

How should tackle this?

31st October, 2016

keevitaja left a reply on DropZone Will Not Display Upload Area • 1 year ago

csrf is not the problem. I just cannot display the dropzone "box"

keevitaja left a reply on DropZone Will Not Display Upload Area • 1 year ago

Nope, these will not resolve this

keevitaja started a new conversation DropZone Will Not Display Upload Area • 1 year ago

Hello!

I cannot get Dropzone working and i am pretty much sure it is just me. I used the dropzone npm package and installed it.

In app.js i have

const Dropzone = require('dropzone')

const AdvertUpload = new Dropzone('div#dropzone', { url: '/file/post'})

In view file <div id="dropzone"></div> and no js errors are displayed.

If i remove the id from div, i get dropzone error?

What the heck am i doing wrong?

16th October, 2016

keevitaja left a reply on Which Linux Distro Should I Use • 1 year ago

I have used Linux, and only Linux, about 20 years... This my recommendation:

Stay away from the Ubuntu family if you want a good Linux desktop.

For all Ubuntu users, i am sorry. If it works for you, keep using it. I have no desire to go into "best linux distro" argument. These are just my personal opinions. And i have also used Ubuntu myself for many years, so i know thing or two.

Ubuntu package management is built in away, that forbids you to use newer software. If Ubuntu has some version Desktop environment in their repositories, then you're pretty much stuck with it. Like for the example if they have older Gnome which comes older GTK, then there is a possibility you cannot use some newer software.

Also Ubuntu's private package manager PPA is piece of crap. You must install a repository for each application and you're still stuck with the libraries that come with Ubuntu installation.

While Ubuntu is a free (as in free beer) software, it is not free (as in free speech). There have been multiple documented cases, where Ubuntu installations have contained shady spyware.

Ubuntu is slow. For some weird reason, there are so many services enabled by default. Perhaps it is not true for some Ubuntu based distros (i just do not know), but this is the case for the official releases. From my personal experience: after i closed services i did not need and uninstalled some packages, my cold-boot memory usage dropped from 1.2gig to 700mb.

While there are some nice looking Ubuntu based distros out there, most of them are not usable for work. They are not 100% stable and bugfixes may take weeks if not month. For work you need a system that is rock solid!

I personally use Manjaro Linux, which is an Arch based distro. And Arch comes with official Pacman package manager and AUR for user repositories. If there is some software available for Linux, and it is open-source, then 99,99% it is available on AUR.

Manjaro as as easy to install and use as Ubuntu. So no worries in that department.

So i recommend you to try out Manjaro. I am not saying, that it is THE best distro out there. Just give it a try!

12th October, 2016

keevitaja left a reply on Vue Powered Collapsable Sidebar Menu • 1 year ago

Huh? No one has never done a collapsing sidebar using Vue?

11th October, 2016

keevitaja started a new conversation Vue Powered Collapsable Sidebar Menu • 1 year ago

Hello!

What is the logic behind Vue handling sidebar menu?

http://www.designerslib.com/wp-content/uploads/2015/11/responsive-navigation-menu.jpg

With jQuery and other legacy frameworks i would first create the html using php and then start modifying the dom.

With Vue should i first create javascript object and let Vue create the menu? And then i would just modify this object and Vue would take care of everything else?

8th October, 2016

keevitaja started a new conversation Bundling Bower Package Css Files With Relative Urls Inside Them • 1 year ago

Hello! I am trying to figure figure out, how to bundle css from bower vendor packages. Currently i am loading different css files:

<link rel="stylesheet" href="{{ asset('bower/AdminLTE/bootstrap/css/bootstrap.min.css') }}">
<link rel="stylesheet" href="{{ asset('bower/font-awesome/css/font-awesome.min.css') }}">
<link rel="stylesheet" href="{{ asset('bower/Ionicons/css/ionicons.min.css') }}">
<link rel="stylesheet" href="{{ asset('bower/AdminLTE/dist/css/AdminLTE.min.css') }}">
<link rel="stylesheet" href="{{ asset('bower/AdminLTE/dist/css/skins/skin-blue.min.css') }}">

And some of these files have relative urls pointing to assets inside them. For the example in AdminLTE we find:

.layout-boxed {
  background: url('../img/boxed-bg.jpg') repeat fixed;
}

So if i use elixir and bundle all these files to bundle.css or something, all these pointers to different assets would be broken.

Is there a way to solve this issue?

3rd October, 2016

keevitaja left a reply on Accessing Global Variables In Vue Components • 1 year ago

wat? this is working...

keevitaja left a reply on Accessing Global Variables In Vue Components • 1 year ago

I am building a modal window component for the AdminLTE which asks for deletion confirmation and then sends delete request dynamically. This is what i have:

app.js

require('./bootstrap');

const app = new Vue({
    el: 'body',
    components: {
        destroy: require('./components/DestroyModal.vue')
    }
});

DestroyModal.vue

<template>
    <button type="button" class="btn btn-danger pull-right" data-toggle="modal" data-target="#deleteConfirmationModal">
        {{ button }}
    </button>

    <div class="modal modal-danger fade" id="deleteConfirmationModal" tabindex="-1" role="dialog" aria-labelledby="deleteConfirmationModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"></button>
                    <h4 class="modal-title" id="deleteConfirmationModalLabel">{{ question }}</h4>
                </div>
                <div class="modal-body">
                    {{ text }}
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-outline" data-dismiss="modal">{{ cancel }}</button>
                    <button type="button" class="btn btn-outline" v-on:click="destroy(url)">{{ button }}</button>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
    export default {
        props: {
            button: { default: 'Delete' },
            question: { default: 'Are you sure?' },
            text: { default: 'Deleting this resource cannot be undone!' },
            cancel: { default: 'Cancel' },
            url: {},
            csrf: {}
        },
        methods: {
            destroy: (url)=> {
                let element = document.querySelector('body');
                
                element.insertAdjacentHTML('beforeend', `
                    <form id="delete-request" action="${url}" method="post">
                        <input type="hidden" name="_token" value="${document.helpers.csrf}">
                        <input type="hidden" name="_method" value="DELETE">
                    </form>
                `);
                
                document.getElementById('delete-request').submit();
            }
        }
    }
</script>

and in blade view file i do

<destroy url="{{ route('admin.user.destroy', $user->id) }}"></destroy>

This is all fine and working. But lets say i need to generata a unique string for the modals ID. There are plenty of functions prewritten, but i do want to share this function with all my vue components. How do i do that?

document.somefunc = () {} does not look OK

keevitaja left a reply on Accessing Global Variables In Vue Components • 1 year ago

But how do i share different things between components? Like custom helper functions...

Pushing them all to window or document object seems silly...

keevitaja started a new conversation Accessing Global Variables In Vue Components • 1 year ago

Hello!

I have declared some javascript variables in blade view files like this:

<script>
    var helpers = { 'csrf': 'dsgsdfjsdlkjsdlkfjskd'};
</script>

And i need to use them in vue components:

<template>
    <form id="delete-request" action="{{ url }}" method="post">
        <input type="hidden" name="_token" value="{{ csrf }}">
        <input type="hidden" name="_method" value="DELETE">
    </form>
</template>

<script>
    export default {
        props: ['url'],
        data: ()=> {
            return {
                csrf: helpers.csrf
            }
        }
    }
</script>

How can i do this? The example above is not working....

2nd October, 2016

keevitaja started a new conversation Handling Dynamic Modal Windows With Vue • 1 year ago

Hello!

What would be the best way to inject modal windows described by vue components into DOM by clicking an html element?

20th September, 2016

keevitaja started a new conversation Modifiying Existing Table With Laravel Migrations Error • 1 year ago

Hello!

I took over a project and i need to modify a table. Add some columns. I created this migration:

    public function up()
    {
        Schema::table('contact_details', function ($table) {
            $table->string('uid');
            $table->string('university')->nullable();
            $table->string('graduation')->nullable();
            $table->string('qualification')->nullable();
            $table->integer('voucher_1')->nullable();
            $table->integer('voucher_2')->nullable();
            $table->boolean('voucher_1_confirmed')->nullable();
            $table->boolean('voucher_2_confirmed')->nullable();
            $table->string('home_address')->nullable();
            $table->string('home_phone')->nullable();
            $table->string('company_name')->nullable();
            $table->string('company_position')->nullable();
            $table->string('company_address')->nullable();
            $table->string('company_phone')->nullable();
            $table->string('company_gsm')->nullable();
            $table->string('company_email')->nullable();
            $table->string('company_sphere')->nullable();
            $table->string('company_speciality')->nullable();
        });
    }

But when i run php artisan migrate, i get the following error:

  [Illuminate\Database\QueryException]                                                                                           
  SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '0000-00-00 00:00:00' for column 'checked_out_time'   
  at row 1 (SQL: alter table `zu7gm_contact_details` add `uid` varchar(255) not null, add `university` varchar(255) null, add `  
  graduation` varchar(255) null, add `qualification` varchar(255) null, add `voucher_1` int null, add `voucher_2` int null, add  
   `voucher_1_confirmed` tinyint(1) null, add `voucher_2_confirmed` tinyint(1) null, add `home_address` varchar(255) null, add   
  `home_phone` varchar(255) null, add `company_name` varchar(255) null, add `company_position` varchar(255) null, add `company_  
  address` varchar(255) null, add `company_phone` varchar(255) null, add `company_gsm` varchar(255) null, add `company_email` v  
  archar(255) null, add `company_sphere` varchar(255) null, add `company_speciality` varchar(255) null)                          
                                                                                                                                 

                                                                                                                                 
  [PDOException]                                                                                                                 
  SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '0000-00-00 00:00:00' for column 'checked_out_time'   
  at row 1                                                                                                                       

What may be causing this? The column in error is present and is datatime.

17th August, 2016

keevitaja started a new conversation Array Sorting Function Without PHP Array Functions • 2 years ago

Hi!

I was given a test task to write a custom array sorting without using anything from the http://php.net/manual/en/ref.array.php

So basically just using loops and simple comparison. And i cannot do it.

How do you sort an [2, 7, 1, 4, 7] array without any of the functions from the link above. It seems like a major hassle or maybe i am just dumb.

17th July, 2016

keevitaja started a new conversation Caprute 'enter' Keypress With Vue • 2 years ago

Hello,

i have a input field (no form) and i need to capture the 'enter' keypress event with the contents of the input field.

How can i do this with vue?

13th July, 2016

keevitaja started a new conversation VueJs Cannot Hande Identical Data In V-for • 2 years ago

Hi, i am pretty sure it is me... so how to do it the correct way.

<div id="main">
    <p><a href="#" @click="append()">add</a></p>
    <p v-for="row in rows">{{{ row.data }}}</p>
</div>
'use strict';

let i = 1;

const main = new Vue({
    el: '#main',
    data: {
        rows: []
    },
    methods: {
        append: function() {
            this.rows.push({data: 'testing ...', id: i});
            i++;
        }
    }
});

This works as expected. Each time when i click append, the row gets appended. But if i try to push identical string this.rows.push('testing ...) then a row will appended only the after the first click,

20th June, 2016

keevitaja started a new conversation Nodejs: How To Know, If A Socket Stream Chunk Is A Partial Or Not? • 2 years ago

"use strict";

const net = require('net');

const socket = net.createConnection(6555, '198.178.123.109', ()=> {
    console.log('Connected!');
});

socket.on('data', (chunk)=> {
    console.log(chunk); // is this chunk partial, or not?
});

The example above receives stream in 2 chunks before starts waiting for the username. How can i determin, that the first chunk is incomplete stream partial?

9th May, 2016

keevitaja left a reply on Laracasts Forum Mobile Navigation Is Limted • 2 years ago

With Firefox Laracasts is not responsive at all...

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.