fraserk

Member Since 5 Years Ago

Brooklyn

Experience Points 72,330
Experience Level 15

2,670 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 518
Lessons
Completed
Best Reply Awards 43
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.

06 Jun
2 weeks ago

fraserk left a reply on Nested Resource Controllers

Post the model let's have a look.

fraserk left a reply on Nested Resource Controllers

This may not be the cause of your issue but the pivot table naming convention is wrong.

 #table: "course_categories"

That should be category_course

04 Jun
2 weeks ago

fraserk left a reply on Class 'Form' Not Found

Did you install the laravel collective HTML /Form Package?

https://github.com/LaravelCollective/docs/blob/5.6/html.md

29 May
3 weeks ago

fraserk left a reply on Vue Router, Nice Looking Routes And Passing Data

You need to use params. Something like this.

Is your router.js file.

{
            path: '/search/quotes/:quote',
            component: QuoteSearchPage
        }

router link

 <router-link :to="{path: '/search/quotes/',params:{quote:'some_quote'}">
13 May
1 month ago

fraserk left a reply on ROLES AND PERMISSION PACKAGE IN LARAVEL

What issue are you having?

18 Mar
3 months ago
08 Mar
3 months ago

fraserk left a reply on Syntax Error, Unexpected '{'

your missing a {

public function addProduct(Request $request)
    {
        if($request->isMethod('post')){
            $data = $request->all();
            //echo "<pre>"; print_r($data); die;
            if(empty($data(['cateogry_id'])){
                return redirect()->back()->with('flash_message_error','Under Category is mssing');
            }
    }
21 Feb
4 months ago

fraserk left a reply on Display An Image

Be sure to create a Symbolic link

php artisan storage:link

Now you can access you image @ http://somedomain.com/storage/image.jpg You can use the asset helper

asset('storage/file.txt');

<img src="{{asset('storage/myimage.jpg')}}">

08 Feb
4 months ago

fraserk left a reply on Vuejs Bootstrap DateTimePicker

I think it just a typo.

Should the class name be far or fas?

 date: 'far fa-calendar',

 up: 'fas fa-arrow-up',
31 Jan
4 months ago

fraserk left a reply on Can't Load Eloquent Relationship Using Axios And Vuex

Try this.

        getThemeSettings: function({commit}){

            axios.get('/admin/designer/api/theme')
                
                .then(response => {

                    commit('SET_THEME', response.data)

                })

            .catch( error => {

                  Event.$emit('requestAlertDanger');

            })
        
        },

fraserk left a reply on Can't Load Eloquent Relationship Using Axios And Vuex

But you said that themeData doesn't have the colors. That's strange becase your setting it here let themeData = response.data; before you save the state.

fraserk left a reply on Can't Load Eloquent Relationship Using Axios And Vuex

console log response.data. Does that have the colors?

fraserk left a reply on Can't Load Eloquent Relationship Using Axios And Vuex

can you console log 'themeData' just to verify you are indeed getting the color back? if possibe post it here.

fraserk left a reply on Can't Load Eloquent Relationship Using Axios And Vuex

@nhayder The state should be something like.

 theme: {
            colors: {},

fraserk left a reply on GMAIL

Silly question. Did you check your spam folder?

29 Jan
4 months ago

fraserk left a reply on VUEX Not Loading Eloquent Query's Relationship

@nhayder How is your state define? Post that section of the file.

Here is an example of how I do it. In my example. Meta, schedules and albums are a relationship to users.

   state:{
        user: {
            meta:{ 

            },
            schedules:{

            },
            albums:{

            }
        },

    },
 
    actions:{
        getUser(context){
            axios.get('/backend/user/settings').then((respsonse)=>{
                context.commit('updateUser', respsonse.data)
            })
        },

fraserk left a reply on VUEX Not Loading Eloquent Query's Relationship

In your vuex try setting the state like

state:{
        theme: {
            color:{ 

            },
}
07 Jan
5 months 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
5 months ago
21 Dec
6 months 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
6 months ago

fraserk left a reply on Parent::child Pages

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

16 Dec
6 months 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
6 months 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
7 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
7 months ago

fraserk left a reply on Side Projects???

@martinbean Both your projects sounds great. Good luck.

07 Oct
8 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
9 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
1 year 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
1 year ago

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

In the .env file set app_debug to true.

04 Apr
1 year 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