CarlEOgden

CarlEOgden

Member Since 7 Months Ago

Experience Points
930
Total
Experience

4,070 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
0
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start your engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-in-session Created with Sketch.

    School In Session

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

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

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

  • subscriber Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist Created with Sketch.

    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 Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

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

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

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

Level 1
930 XP
May
28
3 days ago
Activity icon

Started a new Conversation Storage::disk Listing A Directory

Hi

I have the following code:

		$url = \AmazonS3Helpers::getPath('agency',$agency_id,'Media');
		try {
			$exists = \Storage::disk('s3')->exists($url);
		} catch (Exception $e) {
			# An error occurs communicating with S3, for now, assume the image exists
			# $exists = true;
		}

I need to get list all the files in a folder on Amazon S3, I know the above verifies that this folder exists, how do i get a listing back? I can't seem to work out if there is a function to do this!

Kind regards in advance Carl.

May
26
5 days ago
Activity icon

Replied to Select Boxes - Is It Possible For Text Search By Default

Hi

No, works in safari as I've just tried that as well! Oh and Opera works as well.

Probably won't in mobile but as most of our users are working on PCs, I'm not too worried at the moment, would just like to be able to have an easier way of showing an edit box!

Cheers Carl.

Activity icon

Replied to Select Boxes - Is It Possible For Text Search By Default

In Chrome and in the latest Microsoft Edge (it's in beta and updates regularly) and Firefox developer latest version!

So will presume all browsers!

Cheers Carl.

Activity icon

Started a new Conversation Select Boxes - Is It Possible For Text Search By Default

Hi Guys

Back again to ask dumb questions!

I've got a drop down box I am using for a list of solicitor names, once we populate with many solicitors scrolling up and down to find the one you want is tedious.

Now, I've added a blank line as the first entry called "Please select a solicitor" which has a blank value.

What I have noticed is that if you click it, then press backspace you can then type a part name and are able to search!

Am I able that if there is no value (ie the first option in the list) to have it blank allowing text entry.

I've inherited this system and the code I use to create this select is

@include('partials.input', [
	'id'			=> $sol_id,
	'label'         => 'Solicitor acting for this transaction',
	'type'          => 'select',
	'values'  		=> $agency_solicitors,
	'current_value' => ${'selected_sol_name_' . $loop->index},
	'use_key' 		=> true,
	'key'     		=> 'SolicitorID',
	'content' 		=> 'SolicitorName',
	'help_text'		=> 'To search for a Solicitor, click the above, press backspace and you can then enter your search criteria.<br/>Click Save contact for the information below to be updated.'
])
									])

$sol_id is the unique id $agency_solicitors is the variable used that has the values 'SolicitorID' is the value 'SolicitorName' is the readable name

Thanks for any and all help in advance. Regards Carl.

May
22
1 week ago
Activity icon

Replied to Facebook - Creating An Album

Hi

Thanks for that info, it's now on the back burner!

Cheers Carl.

Activity icon

Started a new Conversation Facebook - Creating An Album

Hi

Sorry if this has been asked before, researching some other posts and their recommended links/reading.

If I wanted to integrate Facebook into our Laravel/Vuejs system, is it difficult?

In simple terms, I'd like to authenticate our user with Facebook and probably their facebook company account/page (not sure which but open to suggestions), then I'd like to be able to create (at the press of a button) an album with a title, description and drop a load of photos into it. Then, I'd like to be able to delete said album (at the press of a button)

Thanks for any and all help in advance Carl.

May
14
2 weeks ago
Activity icon

Replied to How To Build Sql Query Automatically According To The Use Request?

@ptl

Why don't you use stored procedures on your database?

Pass the fields to the stored procedure and you'll be returned with the data?

I've inherited my system to maintain and we do as much as possible in stored procedures and very rarely use a direct db call.

Regards Carl.

Activity icon

Started a new Conversation Identifying The Associated Js File

Hi

New to this, 6 months into modifying an existing laravel/vuejs site.

Whilst I've managed to work my way around the system, once thing puzzles me, how can i easily find which js file is being called?

I know that in my environment, when I create a new template and use the commands, I can then add them to application.js and set a component up, but am struggling to identify (quickly) if it is using a legacy js file.

Is there an easy way to find this out?

Cheers for any and all help and advice! Carl.

Apr
01
1 month ago
Activity icon

Replied to Displaying HTML Text From A Variable In A Blade

Hi

That worked like a dream.

Thank you very much for advise.

Cheers Carl.

Activity icon

Replied to Use Vimeo Only For Authenticated Users?

Hi

As I am new to all this I might be wrong, but, why not try this:

@if (Auth::user())
	@auth
    		// The user is authenticated...
    		// Show the vimeo video
	@endauth
@else
	@guest
    		// The user is not authenticated...
    		// Show whatever you want to show
	@endguest
@endif

Regards Carl

Activity icon

Started a new Conversation Displaying HTML Text From A Variable In A Blade

Hi All

Hope everyone is okay and staying safe!

I've got a daily php cron routine that I'm writing, I've got all the data in my controller and when I then call the blade to create the view that will be emailled, I can't get v-html to display the variable as its coming from a php variable and not a javascript variable.

To call my blade I use:-

\Mail::send('emails.ml-email', compact('subject', 'email', 'email_body', 'agent', 'send_as_email'), function ($message) use ($email, $subject) 

In my blade, i've tried:

{{ $email_body }}

<div v-html="{{ $email_body }}"

but I either get:

<div>Email test</div>

or nothing or just the variable name!

Can anyone help me simply display the text held within $email_body a formatted html.

Thanks in advance for any and all help given Carl.

Jan
21
4 months ago
Activity icon

Replied to Partials Select Dropdown

Hi,

Dumb Question time - where would partials.input be configured?

Activity icon

Started a new Conversation Partials Select Dropdown

Hi

As I've inherited a system to maintain, we have a select drop down list created as follows:-

            @include('partials.input', [
                'label'   => $staff_label,
                'id'      => 'for-staff-member',
                'type'    => 'select',
                'default' => $default_staff_member,
                'values'  => $staff_list,
                'use_key' => true,
                'key'     => 'StaffID',
                'content' => 'StaffName',
                'columns' => 'col-med-50',
            ])

I can populate it ok with the $staff_list variable, which is an array of StaffID / StaffName.

With other select boxes, a title (disabled option) can be created as I'd like it to read:-

Team One Staff 1 Staff 2 Staff 3 Team Two Staff 1 Staff 4 Staff 5

I'd like not to be able to select Team One / Team Two

Anybody have any idea on how I can do this?

Thanks in advance Carl.

Jan
20
4 months ago
Activity icon

Replied to Creating A Collection/array For Using In A 'select' Drop Down Box

Fixed by:-

                $ExpiredCerts = explode("\r\n", $report->ExtraDropDownValues);
                $parts = array();
                $Certification = array();
                foreach($ExpiredCerts as $certs) {
                    $parts = explode("=", $certs);

                    $Certific = new stdClass();
                    $Certific->Certification = $parts[0];
                    $Certific->CertID = $parts[1];

                    array_unshift($Certification, $Certific);

                    unset($Certific);

                    $myKey = $parts[0];
                    $myVal = $parts[1];
                };

                $Certification = array_reverse($Certification);

Adding $Certification to the select now gives me the Label and Value that's required!

Activity icon

Started a new Conversation Creating A Collection/array For Using In A 'select' Drop Down Box

Hi

This is more PHP that Laravel but as i am trying to create a select box pre loaded with data - but that data is from a variable not a database.

I've a working database created variable and it looks like:

"users" => Collection {#909 ▼
    #items: array:3 [▼
      0 => {#1007 ▼
        +"StaffFirstName": "Carl"
        +"StaffFamilyName": "Ogden"
        +"Active": 1
        +"SuperUser": 0
        +"StaffLoginID": "Carl.Ogden"
        +"LastActivity": "2020-01-20 10:41:27"
        +"StaffName": "Carl Ogden"
      }
      1 => {#1008 ▶}
      2 => {#1009 ▶}
    ]
}

This populates a drop down select field perfectly!

I need to create another select list, with the following 2 fields:

Certificate CertificateID

The data I have is:

"ExpiredCerts" => array:9 [▼
    0 => "Energy Performance=EPC"
    1 => "Gas Safety=gas"
    2 => "Electricity Safety=electricity"
    3 => "Oil Safety=oil"
    4 => "Portable Appliance Test=pat"
    5 => "Fire Extinguisher Test=fire_ext_test"
    6 => "Fire Alarm Test=fire_alarm_test"
    7 => "HMO Compliance=hmo"
    8 => "Legionella=legionella"
  ]
}

I can do the following:

foreach($ExpiredCerts as $cert) {
    $parts = explode("=", $cert);
    // $parts[0] reads "Energy Performance"
    // $parts[1] reads "EPC"
}

I need it to look like (the below example I have typed out):

"keys" => Collection {
  #items: array:3 [
    0 => {
    +"Certificate": "Energy Performance"
    +"CertificateID": "EPC"
    }
    1 => {
    +"Certificate": "Electricity Safety"
    +"CertificateID": "electricity"
    }

My question is, how do a create a new variable that will contact a collection and then the array components that I can use?

Jan
07
4 months ago
Activity icon

Awarded Best Reply on Just Done Yarn Upgrade And Now Sortable Errors Are Showing

I fixed this issue by restoring a backup of yarn.lock, package.json and node_modules folder and re-compiled my application.js file and all is good!

Activity icon

Replied to Just Done Yarn Upgrade And Now Sortable Errors Are Showing

I fixed this issue by restoring a backup of yarn.lock, package.json and node_modules folder and re-compiled my application.js file and all is good!

Jan
06
4 months ago
Activity icon

Started a new Conversation Just Done Yarn Upgrade And Now Sortable Errors Are Showing

Hi

Just done a re-compile of my javascript and when I did, it recommended that i perform a yarn upgrade

So i did!

I've commited my yarn upgrade in sourcetree

When i now click on "things" within my application/website, I get the following message:

application.js?id=c6c250a03369e04721f3:49651 [Vue warn]: Error in directive sortable inserted hook: "TypeError: Sortable is not a constructor"

found in

---> <SoPropertyRooms>
       <SoTab>
         <SoTabs>
           <SoTab>
             <SoTabs>
               <SoProperty>
                 <Root>
warn @ application.js?id=c6c250a03369e04721f3:49651
logError @ application.js?id=c6c250a03369e04721f3:50910
globalHandleError @ application.js?id=c6c250a03369e04721f3:50905
handleError @ application.js?id=c6c250a03369e04721f3:50865
callHook @ application.js?id=c6c250a03369e04721f3:55692
callInsert @ application.js?id=c6c250a03369e04721f3:55629
wrappedHook @ application.js?id=c6c250a03369e04721f3:51261
invokeWithErrorHandling @ application.js?id=c6c250a03369e04721f3:50880
invoker @ application.js?id=c6c250a03369e04721f3:51201
invokeInsertHook @ application.js?id=c6c250a03369e04721f3:55358
patch @ application.js?id=c6c250a03369e04721f3:55575
Vue._update @ application.js?id=c6c250a03369e04721f3:52963
updateComponent @ application.js?id=c6c250a03369e04721f3:53084
get @ application.js?id=c6c250a03369e04721f3:53495
Watcher @ application.js?id=c6c250a03369e04721f3:53484
mountComponent @ application.js?id=c6c250a03369e04721f3:53091
./node_modules/vue/dist/vue.common.dev.js.Vue.$mount @ application.js?id=c6c250a03369e04721f3:58061
./node_modules/vue/dist/vue.common.dev.js.Vue.$mount @ application.js?id=c6c250a03369e04721f3:60961
Vue._init @ application.js?id=c6c250a03369e04721f3:54029
Vue @ application.js?id=c6c250a03369e04721f3:54095
./resources/assets/js/application.js @ application.js?id=c6c250a03369e04721f3:63322
__webpack_require__ @ application.js?id=c6c250a03369e04721f3:20
0 @ application.js?id=c6c250a03369e04721f3:90046
__webpack_require__ @ application.js?id=c6c250a03369e04721f3:20
(anonymous) @ application.js?id=c6c250a03369e04721f3:84
(anonymous) @ application.js?id=c6c250a03369e04721f3:87
application.js?id=c6c250a03369e04721f3:50914 TypeError: Sortable is not a constructor
    at inserted (application.js?id=c6c250a03369e04721f3:86393)
    at callHook (application.js?id=c6c250a03369e04721f3:55690)
    at callInsert (application.js?id=c6c250a03369e04721f3:55629)
    at wrappedHook (application.js?id=c6c250a03369e04721f3:51261)
    at invokeWithErrorHandling (application.js?id=c6c250a03369e04721f3:50880)
    at Object.invoker [as insert] (application.js?id=c6c250a03369e04721f3:51201)
    at invokeInsertHook (application.js?id=c6c250a03369e04721f3:55358)
    at Vue.patch [as __patch__] (application.js?id=c6c250a03369e04721f3:55575)
    at Vue._update (application.js?id=c6c250a03369e04721f3:52963)
    at Vue.updateComponent (application.js?id=c6c250a03369e04721f3:53084)
logError @ application.js?id=c6c250a03369e04721f3:50914
globalHandleError @ application.js?id=c6c250a03369e04721f3:50905
handleError @ application.js?id=c6c250a03369e04721f3:50865
callHook @ application.js?id=c6c250a03369e04721f3:55692
callInsert @ application.js?id=c6c250a03369e04721f3:55629
wrappedHook @ application.js?id=c6c250a03369e04721f3:51261
invokeWithErrorHandling @ application.js?id=c6c250a03369e04721f3:50880
invoker @ application.js?id=c6c250a03369e04721f3:51201
invokeInsertHook @ application.js?id=c6c250a03369e04721f3:55358
patch @ application.js?id=c6c250a03369e04721f3:55575
Vue._update @ application.js?id=c6c250a03369e04721f3:52963
updateComponent @ application.js?id=c6c250a03369e04721f3:53084
get @ application.js?id=c6c250a03369e04721f3:53495
Watcher @ application.js?id=c6c250a03369e04721f3:53484
mountComponent @ application.js?id=c6c250a03369e04721f3:53091
./node_modules/vue/dist/vue.common.dev.js.Vue.$mount @ application.js?id=c6c250a03369e04721f3:58061
./node_modules/vue/dist/vue.common.dev.js.Vue.$mount @ application.js?id=c6c250a03369e04721f3:60961
Vue._init @ application.js?id=c6c250a03369e04721f3:54029
Vue @ application.js?id=c6c250a03369e04721f3:54095
./resources/assets/js/application.js @ application.js?id=c6c250a03369e04721f3:63322
__webpack_require__ @ application.js?id=c6c250a03369e04721f3:20
0 @ application.js?id=c6c250a03369e04721f3:90046
__webpack_require__ @ application.js?id=c6c250a03369e04721f3:20
(anonymous) @ application.js?id=c6c250a03369e04721f3:84
(anonymous) @ application.js?id=c6c250a03369e04721f3:87

application.js?id=c6c250a03369e04721f3:49651 [Vue warn]: Error in directive sortable inserted hook: "TypeError: Sortable is not a constructor"

found in

---> <SoBrochureMedia>
       <SoTab>
         <SoTabs>
           <SoTab>
             <SoTabs>
               <SoProperty>
                 <Root>
warn @ application.js?id=c6c250a03369e04721f3:49651
logError @ application.js?id=c6c250a03369e04721f3:50910
globalHandleError @ application.js?id=c6c250a03369e04721f3:50905
handleError @ application.js?id=c6c250a03369e04721f3:50865
callHook @ application.js?id=c6c250a03369e04721f3:55692
callInsert @ application.js?id=c6c250a03369e04721f3:55629
wrappedHook @ application.js?id=c6c250a03369e04721f3:51261
invokeWithErrorHandling @ application.js?id=c6c250a03369e04721f3:50880
invoker @ application.js?id=c6c250a03369e04721f3:51201
invokeInsertHook @ application.js?id=c6c250a03369e04721f3:55358
patch @ application.js?id=c6c250a03369e04721f3:55575
Vue._update @ application.js?id=c6c250a03369e04721f3:52963
updateComponent @ application.js?id=c6c250a03369e04721f3:53084
get @ application.js?id=c6c250a03369e04721f3:53495
Watcher @ application.js?id=c6c250a03369e04721f3:53484
mountComponent @ application.js?id=c6c250a03369e04721f3:53091
./node_modules/vue/dist/vue.common.dev.js.Vue.$mount @ application.js?id=c6c250a03369e04721f3:58061
./node_modules/vue/dist/vue.common.dev.js.Vue.$mount @ application.js?id=c6c250a03369e04721f3:60961
Vue._init @ application.js?id=c6c250a03369e04721f3:54029
Vue @ application.js?id=c6c250a03369e04721f3:54095
./resources/assets/js/application.js @ application.js?id=c6c250a03369e04721f3:63322
__webpack_require__ @ application.js?id=c6c250a03369e04721f3:20
0 @ application.js?id=c6c250a03369e04721f3:90046
__webpack_require__ @ application.js?id=c6c250a03369e04721f3:20
(anonymous) @ application.js?id=c6c250a03369e04721f3:84
(anonymous) @ application.js?id=c6c250a03369e04721f3:87
application.js?id=c6c250a03369e04721f3:50914 TypeError: Sortable is not a constructor
    at inserted (application.js?id=c6c250a03369e04721f3:86393)
    at callHook (application.js?id=c6c250a03369e04721f3:55690)
    at callInsert (application.js?id=c6c250a03369e04721f3:55629)
    at wrappedHook (application.js?id=c6c250a03369e04721f3:51261)
    at invokeWithErrorHandling (application.js?id=c6c250a03369e04721f3:50880)
    at Object.invoker [as insert] (application.js?id=c6c250a03369e04721f3:51201)
    at invokeInsertHook (application.js?id=c6c250a03369e04721f3:55358)
    at Vue.patch [as __patch__] (application.js?id=c6c250a03369e04721f3:55575)
    at Vue._update (application.js?id=c6c250a03369e04721f3:52963)
    at Vue.updateComponent (application.js?id=c6c250a03369e04721f3:53084)

As I am complete novice, can anybody offer any help or advise?

Cheers in advance Carl.

Dec
13
5 months ago
Activity icon

Started a new Conversation Issues With Select Not Selecting Properly

Hi

I've just started to create a new option in the system and I've got the following:

Check box - Enabled Text Box - Description Text Box - Amount Checkbox - Subject to VAT Select - contains Weekly/Monthly/Quarterly/Annually Select - contains 1-27

To draw select boxes I use:

                @include('partials.input-vue', [
                    'label'           => 'Frequency period',
                    'input_id'        => "$form_id_prefix-recurring-frequency",
                    'input_type'      => 'select',
                    'source'          => 'recurringFrequency',
                    'value'           => 'recurringFrequencyValue',
                    'key'             => 'value',
                    'content'         => 'label',
                    'model'           => 'recurringFrequencyInterval',
                    'ignore_for_save' => true,
                    'columns'         => 'col-25',
                ])
                @include('partials.input-vue', [
                    'label'           => 'Day of payment',
                    'input_id'        => "$form_id_prefix-payment-date",
                    'input_type'      => 'select',
                    'source'          => 'paymentDate',
                    'value'           => 'paymentDateValue',
                    'key'             => 'value',
                    'content'         => 'label',
                    'model'           => 'recurringPaymentDate',
                    'ignore_for_save' => true,
                    'columns'         => 'col-25',
                ])

In my JS, I populate it:

        loadPaymentDays() {
            console.log('loading payment days');
            var i;
            for (i = 1; i < 28; i++) {
                this.paymentDate.push({ label: i });
                this.paymentDateValue.push({ value: i });
            }
        },
        loadFrequencyTimes() {
            console.log('in here setting up frequency');

            this.recurringFrequency.push({ label: 'Weekly' });
            this.recurringFrequency.push({ label: 'Monthly' });
            this.recurringFrequency.push({ label: 'Quarterly' });
            this.recurringFrequency.push({ label: 'Annually' });

            this.recurringFrequencyValue.push({ value: 0 });
            this.recurringFrequencyValue.push({ value: 1 });
            this.recurringFrequencyValue.push({ value: 2 });
            this.recurringFrequencyValue.push({ value: 3 });
        },

Whenever I choose an option such as Monthly, the first time it pops up Weekly, then I change it, I then go to the description box, type something, the select automatically jumps back to Weekly. Again, with the Day of payment that does the same.

Is anybody able to give me clue of what I've done wrong?

I've cut/pasted existing forms to create this new form.

Thanks in advance Carl.