jimmck

jimmck

Member Since 5 Years Ago

Experience Points 62,425
Experience Level 13

2,575 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 8
Lessons
Completed
Best Reply Awards 52
Best Reply
Awards
  • start-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-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-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist 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.

18 Aug
10 months ago

jimmck left a reply on Mailable: Non Numeric Value Encountered

Yeah no need for routes. URL cannot pass class instances! Controllers cannot receive class instances directly from a URL. Use Middleware to inspect a URL from a ROUTE and maybe construct a class instance and PASS it to the controller. Hence the word Middleware. Or if you are more adventurous your code Infer the Class and constructor data in the URL but really why?

Emails have separate URL links than webpages. Different mediums. Emails contains contain more static and/or time dependent data.

17 Aug
11 months ago

jimmck left a reply on Mailable: Non Numeric Value Encountered

@Snapey @vincej Then you could route those URL's to a different class of constructor. You can construct the email to use a whole different set of Controllers than what a normal webpage might call. Share the backend processing once it has been properly routed.

jimmck left a reply on Mailable: Non Numeric Value Encountered

@vincej Emails have no idea of your servers PHP class structure. What does your URL specifically look like as formatted in the email? Does the URL contain enough unique information to identify the order?

14 Aug
11 months ago

jimmck left a reply on How Can I Convert Many Statement Mysql To Laravel Eloquent?

You could have done all of this in 1 SQL statement. Are you under the impression that Eloquent will do some magical transformation? It will not. Learn Eloquent and convert it. No one here knows or understands your data or your database structure. What was the purpose of this original SQL? You need to answer to that to convert into Eloquent or any other ORM.

jimmck left a reply on Need Help Understanding Public Functions

Well your not using $this if the function is part of the controller class. Jeff has great intro videos to basic concepts. Thats what this site EXCELS at.

13 Aug
11 months ago

jimmck left a reply on How To Handle Event Listeners In Single Page Application?

Use Vue. It makes managing events easy.

jimmck left a reply on Problem With Vhosts

@Viernes Hi Hmm... looked at Acrylic it forwards packets to a proxy server and routes back to local? No we don't what that. I assume you have local hub/router or wifi provider LOCAL to your PC? All of my machines are connected of DHCP LOCALLY and dnsmasq runs locally. I used to do this as you want on a Windows setup. Your running XAmpp which was my original Apache server. So each virtual host needed a hosts entry.

Can you please give me brief overview of your LOCAL Xamp setup: router setup... Or are you stricly one machine localhosting???

Searching for dnsmasq Windows equivalents and so far nothing. Are you running in a VM?

12 Aug
11 months ago

jimmck left a reply on Problem With Vhosts

@Viernes Are you on a Mac? You use dnsmasq and create virtual projects by just adding a vhost entry. Nothing goes in your hosts except the dnsmasq alias you create once. Homebrew has a service for dnsmasq. Works great.

06 Aug
11 months ago

jimmck left a reply on Private Method Injection In A Trait

There is nothing to inject. Traits do not exist on their own. All of the enclosing objects is available to the trait.

jimmck left a reply on Private Method Injection In A Trait

Traits are shared methods/data added to a class. The class using a Trait still needs to be instantiated.

03 Aug
11 months ago

jimmck left a reply on Laravel - Large Database

@matteoEB S3 is a service provided for Amazon EC3 cloud infrastructure. The PHP League has a great library for managing the code.

    $s3 = Aws\Laravel\AwsFacade::get('s3');
    $result = $s3->putObject(array ('Bucket' => 'bucket-name', 'Key' => 'xxxxxx', 'Body' => 'Hi!!!!!',));
    print  $result['Expiration'] . "\n";
    print  $result['ServerSideEncryption'] . "\n";
    print  $result['ETag'] . "\n";
    print  $result['VersionId'] . "\n";
    print  $result['RequestId'] . "\n";
    // Get the URL the object can be downloaded from
    print  $result['ObjectURL'] . "\n";

http://flysystem.thephpleague.com/docs/adapter/aws-s3/

01 Aug
11 months ago

jimmck left a reply on Getting Data Into Vue Component

You need to show your Blade file.

25 Jul
11 months ago

jimmck left a reply on VUE Js Sending Data As A Props

@amjadkhan896 HiWhen you mean hide? Do you mean the JavaScript source? In that case on non secure sites no. The browser view source shows all the code delivered to the browser. That kind of data has to come from the server over HTTP. And then if you don't have anything monitoring HTPP traffic only the browser app knows. https connections are much more secure you can't see a lot of stuff in the browser anymore. There are plenty of examples of locking down apps. You need to be more specific in what your design is.

jimmck left a reply on VUE Js Sending Data As A Props

In older versions of Vue props were 2 way. So you send/get data with components. Since then props are strictly one (read only). I have always treated props as custom HTML attributes used to configure the Vue component. I use component methods to get/set data with a component. Of course you have to give unique Id to each component instance so can message it.

22 Jul
11 months ago

jimmck left a reply on Any “famous” Sites Built With Laravel?

Fully stocked with popcorn!

20 Jul
11 months ago

jimmck left a reply on Mixing Vue SPA With Laravel Routes

Yes. I only write SPA Vue apps. Post messages to specific Laravel routes. I use JSON for the message protocol.

19 Jul
11 months ago

jimmck left a reply on LARAVEL OR PHP VERSION ISSUE !!

MySQL is not installed for one.

14 Jul
1 year ago

jimmck left a reply on Union/Join/Merge Table To Get The Result

@ravipw1801 Hi again. Do you know how to join tables in a database? There is no magic Eloquent solution. If you don't understand SQL you will not be able to solve the problem. You have listed your Table schema's. There is no way to answer your question, only you understand the actual structure of the data.

13 Jul
1 year ago

jimmck left a reply on Union/Join/Merge Table To Get The Result

If a user_id can post either a business or social type you can join on that. You may need a mapping table to help match different business/social relationships (Metadata).

21 Jun
1 year ago

jimmck left a reply on Can't Connect To Mysql

Make sure access to MySQL is allowed for localhost.

https://dev.mysql.com/doc/refman/8.0/en/problems-connecting.html

Latest MongoDB releases as well.

07 May
1 year ago

jimmck left a reply on Putting Model Data Into More Than One Tables

@saadaan The proper way to describe that matrix is 8x250. Its important to use proper terms. No real reason why this would be in a database. If its a fixed dimension randomly accessed file should suffice. Floating point numbers don't index or search in a database.

06 May
1 year ago

jimmck left a reply on Putting Model Data Into More Than One Tables

@saadaan Describe the data arrangement of the matrix. Its 250 columns by 8 rows? What do the 8 rows represent? And columns? Are the 8 rows distinct? There are many ways to represent a matrix in a database schema.

25 Apr
1 year ago

jimmck left a reply on Can't Turn An Object Into An Array.

This object has private, protected or public data members only a constructor which takes an array and a method to iterate the array.

19 Apr
1 year ago

jimmck left a reply on Slow MySQL Query With Laravel Eloquent

@rafito Your query is doing a count and checking if 2 other selects have any rows? Since I don't know your data sets why are you doing the exists at all? Either the count result will be zero or > 0. The 2 exist selects seem to filter a result set? What is the main driving table in relation to these 2 exist sub-queries? Just creating indexes to speed up a query can hurt the overall performance of your database. Proper indexes will help the optimizer limit the table scan, too many indexes can force a full table scan. Do SQL Explain plan on this query to see what the optimizer will do.

17 Apr
1 year ago

jimmck left a reply on PHP Fatal Error Says Exception\Handler Does Not Exist In An Essentially New Laravel Build

What is the name of the class in $concrete? composer.json file is not shown. No stack trace? As already stated debugger or put a dd in Container.php ( you can clean it later).

16 Apr
1 year ago

jimmck left a reply on Laravel 5.2 -> Laravel 5.6 Framework Upgrade

@joshuabedford I use many libraries from the collective and they run fine in 7.1. Main issues I have is PHP code written for 4.x or early 5. Code written in a less (OOP) style in older PHP naming conventions will generate many warnings and will fail silently in certain situations (like pass by ref vs. pass by value) and packages not using Use causing namespace collisions.

jimmck left a reply on MCrypt Deprecation Warning Breaks File Upload - PHP7.1 MCrypt Laravel 5.2

@joshuabedford Glad you got it going. The "Composer Fire Dance" is very important to understand. When I first started using this it was frustrating and seemed stupid. Learning the tool saved time, help find problems and fix them. You should do the upgrade to 5.6 yourself to learn the Laravel environment. What are your deprecated features you depend on (Laravel deprecated they die hard and FAST)? If you are using 7.13 already good. Otherwise you have PHP remediation to do in order to move PHP 7.13.

05 Apr
1 year ago

jimmck left a reply on MCrypt Deprecation Warning Breaks File Upload - PHP7.1 MCrypt Laravel 5.2

@joshuabedford You cannot use mcrypt. A link in the article I posted when to another report. Did you read that? What is the OpenSSL version in your installation. I had many such incidents when moving to 7.x You have look at the code and the 7.x release notes and mitigate it.

https://github.com/phpseclib/phpseclib/issues/1134

There are no magic solutions.

Dont publish the whole stack trace, the first 25 lines will work. What versioin of phpspec are you using same with OpenSSL.

27 Dec
1 year ago

jimmck left a reply on Extending A Vendor Package

Well you can fork it. Put it into your own repository and reference that instance in your. Remove the original package.

    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/jimmck/MyUtils"
        }
14 Dec
1 year ago

jimmck left a reply on Setting Up The Command Line In PHPStorm / Windows / Homestead

https://confluence.jetbrains.com/display/PhpStorm/Laravel+Development+using+PhpStorm

If things don't seem synced, remember to 'Synchronize your project after updates.

Right click on the top of the project tree in the project pane on the left side to get menu and select Synchronize name.

jimmck left a reply on Phpstorm Command Line Tools And Vagrant / Homestead(SSH)

https://confluence.jetbrains.com/display/PhpStorm/Laravel+Development+using+PhpStorm

If things don't seem synced, remember to 'Synchronize your project after updates.

Right click on the top of the project tree in the project pane on the left side to get menu and select Synchronize name.

12 Dec
1 year ago

jimmck left a reply on Adding 0.000005 To 0.000005?

@13en Are you trying to update all of the rows in your DB where the cost is > .0000005 + .000005 ? Using a formula as a part of a where clause? My initial thought was/is can't work. But apparently in MySQL there is way. Which looking at the solution with an alias and HAVING seems interesting. Note I have not tried this yet, going to to so as its interesting. Remember Eloquent is an ORM not an extension to SQL. All Eloquent code turns into SQL and may further process the returned result sets. Of course any searches apply to result sets. But interesting question! I will be check this further. Good Luck.

https://stackoverflow.com/questions/21353959/sql-query-by-adding-two-columns-in-where-clause

Here is search URL

https://www.google.com/search?q=mysql+where+clause+with+formula&oq=mysql+where+clause+with+formula&aqs=chrome..69i57.20663j0j7&sourceid=chrome&ie=UTF-8

10 Dec
1 year ago

jimmck left a reply on Will Laravel Have A Official Implementation Of Websockets (real-time)?

Check out ZMQ works great with Rachet/PHP/Java/JS.

Not sure what you mean by official Laravel. You can many things.

http://zeromq.org/

06 Dec
1 year ago

jimmck left a reply on How To Render A Component When You Ajax The Html?

@check202 Hi. You don't really seem to understand Vue. Dynamic rendering is what it does. Jeff has a free and excellent video series on Vue. I suggest you start there. nextTick events by the way are part of the regular update cycle in Vue when it renders parts of the DOM which have changed.

28 Nov
1 year ago

jimmck left a reply on How To Mix Multiple Js In One?

Jeff has a great Free video series on Webpack and laravel mix.

06 Nov
1 year ago

jimmck left a reply on Composer Help

Now that we understand the problem. Here is how I pull my GIT packages. The projects composer.json

   },
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/jimmck/MyUtils"
        },
        {
            "type": "vcs",
            "url": "https://github.com/jimmck/MyMongoDB"
        }
    ]
}

@Cronix !!!

jimmck left a reply on Composer Help

Lookup the package on packagist.org and follow the install instructions. If there is no install for it don't put in the vendor directory.

05 Nov
1 year ago

jimmck left a reply on Adding A Space....

In sql

select first_name || ' ' || last_name as name ...

Double Pipe

||

Is the ANSI standard for concatenation in SQL.

01 Nov
1 year ago

jimmck left a reply on Laravel Frequently Showing 'Undefined Variable: _SERVER'

Are you all working in the same shared laravel directory? I assume you are running one actual server instance not 4 off the shared directory?

30 Oct
1 year ago

jimmck left a reply on How Can I CONCATENATE.

In SQL || "Pipe Pipe" concats separate DB columns.

select first_name || last_name as Name, age, city ...
27 Oct
1 year ago

jimmck left a reply on Pi (π) Button

Prime number sieve function?

jimmck left a reply on Check For Duplicate Entry And Skip During Import?

As @Snapey is asking, How many records to import? The database will be do this check for you with the constraint violation on import as shown (When fail next record from input is read). But as the master table table grows the time to insert will increase as each insert will take time to scan THE constraints. You can of course maintain an array of inserted records from the source and have the loader check this array before insert. Shorter list to check and in memory.

13 Oct
1 year ago

jimmck left a reply on Change Imported File Encoding In Laravel

You cannot just change the encoding of a whole file. You have to parse the content. And Excel files are a Binary format you cannot try to convert a binary file like this. There is no "magic" way to do this.

12 Oct
1 year ago

jimmck left a reply on Combine Two Tables Into One Result Set. Merge/append/join

@patrykszady Can you list the 2 table columns? If you want one result set you will need to join the 2 tables. Eloquent ORM will not solve this problem efficiently you will end up passing in a raw query. A SQL query will do the merge/append/join that you require that is what SQL is for. Are you using MySQL? This is probably a great use off a Group By with Rollup. You will get a result set with expected results. The ORM will be break this up into many queries and then attempt to merge data or worse leave you with a bunch on collections to manually combine. I know of only one reader of this forum who may be able to show an Eloquent way, but I have not seen him in a long time.

jimmck left a reply on Combine Two Tables Into One Result Set. Merge/append/join

Hi, What are the columns for each table ? Is expense_splits.expense_id related to expenses.id meaning the splits table has many instances? What is the purpose for each table?

06 Oct
1 year ago

jimmck started a new conversation Fractional Units CSS GRIDS Video Is Not Free?

In the CSS Grids series Fractional Units is not free? The others can be viewed?

30 Sep
1 year ago

jimmck left a reply on Vue Refs

$refs point to Vue components. clockpicker is dependent on JQuery. If you want to port it you have to make it an actual Vue component. Or just use JQuery in your Vue app, its easily done. But JQuery components will not show up in your $refs array unless it is wrapped into Vue component.