fraserk

fraserk

Member Since 5 Years Ago

Brooklyn

Hire Me
Experience Points 68,460
Experience
Level
Lessons Completed 503
Lessons
Completed
Best Reply Awards 40
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.

07 Jan
2 weeks ago

fraserk left a reply on Fingerprint

There's a SDK on their website. https://www.zkteco.com/en/download_catgory.html Dont know if that will work for you

fraserk left a reply on Do You Use Named Routes Or Action([PostController::class, 'show']) ?

Name route. It just feels more natural for me.

31 Dec
3 weeks ago
21 Dec
1 month ago

fraserk left a reply on Getting Call To Undefined Function On Controller

should be

$this->getPercentageChange($request->input('originalPrice'), $request->input('finalPrice'));
20 Dec
1 month ago

fraserk left a reply on Parent::child Pages

@ludo1960 you do know that laravel is not a CMS right?

16 Dec
1 month ago

fraserk left a reply on Need Assistance With VueJS And Lists

Add the v-for to loop over the dmas data

<option v-for="dma in dmas" v-bind:value="dma.state"> @{{dma.state}}</option>

fraserk left a reply on Need Assistance With VueJS And Lists

@WSTRWYATT - OK good. try change

 data:{
        dmas: [],


      },

to

 data:{
        dmas: {},


      },

fraserk left a reply on Need Assistance With VueJS And Lists

@WSTRWYATT - ok good. Try changing

 data:{
        dmas: [],


      },

to

 data:{
        dmas: {},


      },

fraserk left a reply on Need Assistance With VueJS And Lists

@wstrwyatt Yes, that goes in the axios callback. Are you sure the api is returning data.

If you do a console.log(response.data) in the axios callback, do you get the desire data back?

fraserk left a reply on Need Assistance With VueJS And Lists

@WSTRWYATT - Try setting dmas data as this.

this.$set(this.$data,'dmas',response.data);

fraserk left a reply on Need Assistance With VueJS And Lists

looking over your origanal code the only error i spot is

v-for="dmas in dmas" 

This should be like

v-for="dma in dmas" 

So the  opttion part should be.

<option v-for="dma in dmas" track-by="$index" :value="dma.state" :key="dma.state">@{{dma.state}}</option>

fraserk left a reply on Need Assistance With VueJS And Lists

Try this

<select v-model="dmas">
  <!-- inline object literal -->
  <option v-bind:value="{ dmas.state }">{{dmas.state}}</option>
</select>

fraserk left a reply on Need Assistance With VueJS And Lists

One error I spot is

<option v-for="dma in dmas" track-by="$index" :value="dma.state" :key="dmas.state">@{{dmas.state}}</option>

should be 

<option v-for="dma in dmas" track-by="$index" :value="dma.state" :key="dma.state">@{{dma.state}}</option>
04 Dec
1 month ago

fraserk left a reply on Time Conflict Checker For A Teacher Or A Room

Hi, I'm also working on a scheduling project. Here is how i'm determining if a slot or room is available. You might want to look at http://php.net/manual/en/class.dateperiod.php.

It's a little icky right now but it works.

    public function providerSchedule(Service $service, User $user)
    {
        
        $day_of_the_week = carbon::parse(request('date'))->format('D');        
        $date = $user->schedules()->pluck('opening_hours_'.strtolower($day_of_the_week));
        $bookings = $user->getBookingsByDay(request('date'));
            
            $start = Carbon::instance(new \DateTime(request('date') . $date['0']['0']));
            $end = Carbon::instance(new \Datetime(request('date') . $date['0']['1']));
            
            $interval = CarbonInterval::minutes($service->duration);
            $period = new \DatePeriod($start->addMinute(5), $interval, $end);
            $slots = collect($period);
            $myslots = $slots->map(function($items,$keys) use($bookings){
            
 // checking to see if a timeslot is available.  
                 foreach ($bookings as $book) {
                    
                    if (($items >=  $book->book_from) && ($items <= $book->book_to)) {
                        return [
                           'slot' => $items->subMinute(5)->format('m-d-y h:i a'),
                           'Booked' =>true
                       ];
                       
                    }

                 };
            return [
                'slot' => $items->subMinute(5)->format('m-d-y h:i a'),
                'Booked' => false
            ]; 
            });
            
            return collect($myslots);
        
    }
21 Nov
2 months ago

fraserk left a reply on What Does $guard In Admin Or User Do?

Ahh @wilk_randall you'r ecorrect. $guard was used in laravel 5.2 i think, as a way to authenticate against multiplies tables..

From the docs.

In your auth.php configuration file, you may configure multiple "guards", which may be used to define authentication behavior for multiple user tables.

https://laravel.com/docs/5.2/authentication#resetting-passwords

fraserk left a reply on What Does $guard In Admin Or User Do?

Its use to protect your database from mass assignment.

https://laravel.com/docs/5.7/eloquent#mass-assignment

fraserk left a reply on Side Projects???

@martinbean Yes i'll be in laraconUS next year. I actually works next to the venue.

20 Nov
2 months ago

fraserk left a reply on Side Projects???

@martinbean Both your projects sounds great. Good luck.

07 Oct
3 months ago

fraserk left a reply on Inserting Data To User

It's means your not inserting the user role_id when you're creating the user. Which is set to not null on the database

21 Sep
4 months ago

fraserk left a reply on Submit Post Route Returning "page Can’t Be Found"

Check and verify url the form posting to.

10 Apr
9 months ago

fraserk left a reply on What Does Mean "Too Few Arguments To Function"?

My guess is one of these veriable are empty $filename,$v,$name. You need to pass all 3 put only 2 were passed in.

08 Apr
9 months ago

fraserk left a reply on Whoops, Looks Like Something Went Wrong :(

In the .env file set app_debug to true.

04 Apr
9 months ago

fraserk left a reply on Can't Get Basic Policy To Work

Right, if the User is already logged-in, they will be redirected to /home.

15 Jan
1 year ago
15 Oct
1 year ago

fraserk left a reply on Display Images From Database

or $album->cover_image

10 Oct
1 year ago

fraserk left a reply on Build A Forum - Public Function Path() ERROR

if you dd($thread->path()) What does that return?

25 Sep
1 year ago

fraserk left a reply on Is Laracast Subscription A One Time Payment?

There's a forever plan for $350, if you can afford that.

13 Aug
1 year ago

fraserk left a reply on Ads Make Site Slow

Yea there's no ads in this site.

01 Aug
1 year ago

fraserk left a reply on Generate Thumbnails Without Storing Them

You can use intervention chache package, which allows you to resize images on the fly.. http://image.intervention.io/use/cache

19 Jul
1 year ago

fraserk left a reply on Checkboxes

That line should be.

$content = "Someone purchase your picture:" .$picture  .".jpg";

13 Jul
1 year ago

fraserk left a reply on Policies Not Working Properly After Cloning App To Another Server

check the laravel log..storate/logs/lavavel.log

01 Jul
1 year ago

fraserk left a reply on Why Not Working Bootstrap Date Picker?

I just meant there's better ways to organize you JS files. The problem was you wasn't loading the script in the correct order, because you had everything in the view file.

one way is to create a scripts section in the layout template.

@yield('scripts')

and in the view file

@section('scripts')
      <script type="text/javascript" src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
    <!-- Bootstrap Date-Picker Plugin -->
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.4.1/js/bootstrap-datepicker.min.js"></script>
    <script>
    $(document).ready(function(){
      var date_input=$('input[name="date"]'); //our date input has the name "date"
      var container=$('.bootstrap-iso form').length>0 ? $('.bootstrap-iso form').parent() : "body";
      var options={
        format: 'mm/dd/yyyy',
        container: container,
        todayHighlight: true,
        autoclose: true,
      };
      date_input.datepicker(options);
    })
    </script>
@endSection

fraserk left a reply on Why Not Working Bootstrap Date Picker?

This is a quick and dirty way to get it working.

in app.blade.php add in that order

    <script type="text/javascript" src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
    <!-- Bootstrap Date-Picker Plugin -->
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.4.1/js/bootstrap-datepicker.min.js"></script>
    <script>
    $(document).ready(function(){
      var date_input=$('input[name="date"]'); //our date input has the name "date"
      var container=$('.bootstrap-iso form').length>0 ? $('.bootstrap-iso form').parent() : "body";
      var options={
        format: 'mm/dd/yyyy',
        container: container,
        todayHighlight: true,
        autoclose: true,
      };
      date_input.datepicker(options);
    })
    </script>

fraserk left a reply on Why Not Working Bootstrap Date Picker?

Check the console see if you're getting any errors?

fraserk left a reply on Why Not Working Bootstrap Date Picker?

Move the scipts tags to app.blade.php

18 Jun
1 year ago

fraserk left a reply on Some Issues With Laracast And The Popular Course Here On Laravel

The error states the error. ClassLoader.php fail to open steam because of permission denied. It has nothing to do with the course. Something is not right with you laravel installation.

17 Jun
1 year ago

fraserk left a reply on How To Create A Method To Only Return A View

Then what's happening. any errors?

10 Jun
1 year ago

fraserk left a reply on Running Tests, In Sublime Text, On Homestead, On Windows. Yeah. I Know.

Why don't you take the time to set up your machine correctly? im on windows and run my test the same was Jeffery does. I actually use Atom and run my test directly in it.

07 Jun
1 year ago

fraserk left a reply on Error When I Try To Edit Users

Which file is throwing the error?

06 Jun
1 year ago

fraserk left a reply on Image Intervention - Image Source Not Readable

Try adding a slash / before img.

public_path('/img/logo.png')

fraserk left a reply on Homestead Is Saying "No Input File Specified".

Have you tried "vagrant provision"

fraserk left a reply on Image Intervention - Image Source Not Readable

Okay, you say it works locally, did you verify that logo.png is on the production server and the path is correct.

fraserk left a reply on Image Intervention - Image Source Not Readable

Does it tell's you which line it failing at? At least we know exactly where's it failing.

30 May
1 year ago

fraserk left a reply on How To Join Laravel 5.4 To Windows Active Directory Server?

Like i said before, I haven't used this package as yet.

Here's how to interact with AD


// Finding a user.
$user = Adldap::search()->users()->find('john doe');

// Searching for a user.
$search = Adldap::search()->where('cn', '=', 'John Doe')->get();

// Authenticating against your LDAP server.
if (Adldap::auth()->attempt($username, $password)) {
    // Passed!
}

// Running an operation under a different connection:
$users = Adldap::getProvider('other-connection')->search()->users()->get();

// Creating a user.
$user = Adldap::make()->user([
    'cn' => 'John Doe',
]);

$user->save();

fraserk left a reply on API Call With Token Returns Unauthenticated Error

You have to pass the api_token as a query string.

http:://url.div//channels?api_token=3238dsffew

fraserk left a reply on How Would This Be Written In Blade?

<ul>
@foreach ($c in $cat)
    <li>$c->name </li>  
@endforeach 
</ul

fraserk left a reply on How To Join Laravel 5.4 To Windows Active Directory Server?

First you had a typo.

//You have 
composer require adlap2/adldap2-laravel

//It should be 
composer require adldap2/adldap2-laravel