tomasz.r

tomasz.r

Member Since 1 Year Ago

Experience Points 20,190
Experience
Level
Lessons Completed 182
Lessons
Completed
Best Reply Awards 3
Best Answer
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.

09 Mar
1 year ago

tomasz.r left a reply on Actvate Individual Item

You can, for example, add activeIndex in your data. Im guessing you are using a v-for. You can loop through items with their indexes too, like item, index in items. On your div then @click="activeIndex = index".

Figure out the rest.

tomasz.r left a reply on [Vue Warn]: Error In Mounted Hook

Thats cool, good luck on your projects!

tomasz.r left a reply on [Vue Warn]: Error In Mounted Hook

I think you need vue-resource to use this.$http.

https://github.com/pagekit/vue-resource

tomasz.r left a reply on Laravel Mix + Blade + Vue

You can use props, an API request or inline-template, but that moves your template outside the .vue file.

https://vuejs.org/v2/guide/components.html#Inline-Templates

tomasz.r left a reply on Animate Element When Pushed/removed

You can just add a <transition-group> </transition-group> to wrap your list,a nd create a fitting animation.

Read this: https://vuejs.org/v2/api/#transition-group

tomasz.r left a reply on Load Vue-localization Files Using Browserify

What error are you getting?

23 Feb
1 year ago

tomasz.r left a reply on Password Change Checking With Existing Password

Did you use Hash::check? as @Mittensoff suggested? Because thats exactly what it is used for. Can you show your code?

tomasz.r left a reply on Page Update

You need to use either Node server with sockets, or an external service like Pusher. Then just subscribe to a channel and listen for your event in your JS code. On the other end you emit an event when a record gets updated.

tomasz.r left a reply on How To Do Two Dropbox For Regions And Filter Cities Based On The First Dropbox?

Oh, thats because activeRegion gets the value of 0 and is treated as false. If you set it to 0 anyway at init, just remove the v-if="activeRegion" from your second dropbox.

22 Feb
1 year ago

tomasz.r left a reply on Updating Elements Outside Of A Component

I'm not sure what is your goal here. Do you not want to repeat the wrapping of section>div?

You can just move that wrappers to your message components, if thats what you need.

tomasz.r left a reply on Laravel5.4 Redirect To A Named Route Populate Parameters Via Eloquent Models.

I believe that ID is extracted by default from the models.

This also works the other way, if you have

/user/{user}

and in your controller

public function show(User $user) {

}

it automatically gets the user by id inserted as {user} in your route

tomasz.r left a reply on Laravel5.4 Redirect To A Named Route Populate Parameters Via Eloquent Models.

Yes, as long as it's value actually represents the id of the model.

tomasz.r left a reply on [newbie] VueJS + PHP Calendar

You would need some kind of API. Something like /api/{user}/calendar/{date}. This should return JSON with your corresponding data. You should also use authorization, so a user can access only the data that belongs to him.

On the Vue side, you of course would need to render a calendar with all the dates needed. Then, after a date is clicked, you fire an AJAX call matching that date, retrieve the response JSON, put it into a variable and display it to the user.

tomasz.r left a reply on Updating Elements Outside Of A Component

Is your h1 also outside the element you bind your Vue instance to?

tomasz.r left a reply on How To Do Two Dropbox For Regions And Filter Cities Based On The First Dropbox?

Your value doesnt work because you need to use value="@{{region.id}}". Notice the "".

You can add a variable to your data, and say call it activeRegion. Then bind it as v-model to your select.

<select name="region" id="region" class="form-control" v-model="activeRegion"> 
       <option  v-for="(region, index) in regions"  value="@{{region.id}}">
         @{{region.name}}
    </option>
                            
 </select>

Then, just create the other dropbox, with that region's cities. Also, notice the v-if, thats to prevent any unwanted behaviour when you dont have any region selected.

<select name="city" id="city" class="form-control" v-if="activeRegion"> 
       <option  v-for="city in activeRegion.cities"  value="@{{city}}">
         @{{city}}
    </option>
                            
 </select>

Hope this helps.

tomasz.r left a reply on Problem With Table And Toggle Button

@WebKenth I'm not sure that you can call methods from beforeCreated() though. I think they are initialized after that.

tomasz.r left a reply on Laravel Config Application Name

@yijani by presentation I mean things like titles, mail headings, etc.

tomasz.r left a reply on How Do I Allow Authenticated And Unauthenticated API Requests To A Single Controller?

Are you using a token to authenticate API users?

If so, try `Auth::guard('api')->check()'. The default Auth uses the 'web' guard, which is based on session.

tomasz.r left a reply on Laravel Config Application Name

I believe app name is only used in presentation. Also, it's a string, so it shouldn't bet a problem to set it to anything you like.

tomasz.r left a reply on How Do I Configure Laravel 5.3 With Vue?

Did you run npm install after installing Laravel?

tomasz.r left a reply on How Do I Allow Authenticated And Unauthenticated API Requests To A Single Controller?

Well, you could do an Auth::check() inside your controller's method, and return the appropriate response, or simply have two different routes, one protected with all the specific info, and the other unprotected, with the general info.

tomasz.r left a reply on Cascade Dropdown

The best way would be creating an API, so you could do an AJAX request for /api/financials?year=2017&company=Bagy. You then would need to wire it up with some JavaScript (I recommend using a framework, like Vue.js), so that after selecting an option you fire an AJAX call with your query, and then just output the response data to your HTML.

If you need Vue/API creation help, there are a lot of tutorials on Laracasts.

https://laracasts.com/series/learn-vue-2-step-by-step https://laracasts.com/series/incremental-api-development

tomasz.r left a reply on Getting Started Pulling In Node-modules

Okay, first things first - require() doesn't exist in browsers. If you dont use compilers, it won't work.

You need to have Node.js installed on your PC, then you need to complike your JS with a tool like Webpack (it's included with Laravel). Laravel also has this Laravel Mix, which makes things even easier.

Then, you could for example add window.PDFDocument = require 'pdfkit' in your bootstrap.js file. Binding it to window lets you instantiate it anywhere (of course after binding it) as var doc = new PDFDocument.

You then compile your assets, they then probably end up in /public/js/app.js, you link to that script in your layout, and here you go.