5150studios

5150studios

Member Since 5 Years Ago

Gold Coast

at Universal Technology Australia

Experience Points 30,790
Experience Level 7

4,210 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 473
Lessons
Completed
Best Reply Awards 1
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.

22 Mar
1 year ago
21 Mar
1 year ago

5150studios started a new conversation RabbitMQ Between 2+ Laravel Services

Hey guys,

Really stuck on a problem with trying to have long listening workers in Laravel.

Error I can push messages onto RabbitMQ and see them being queued up in the RabbitMQ Dashboard, I can even push up a test using the "Fanout" method with 2 simple PHP scripts but I simply don't know where to begin on the Laravel end for listening to these queues.

Goal

  1. Push a message onto RabbitMQ from Laravel (Service 1)
  2. 1 or more additional Laravel Services are looking for that event, say UserUpdated and can grab it's message, perform their tasks and finish

Help How do you get a long lived queue or job running in Laravel listening for events pushed to RabbitMQ? I've gone through so many packages now on GitHub and none of them explain this clearly. Your help is much appreciated.

Example Scripts for Pub/Sub https://blog.programster.org/rabbitmq-exchanges-with-php

07 Dec
1 year ago

5150studios left a reply on VirtualBox Or Parallels On Vagrant For MacOS

I recommend Laravel Valet as well, it's lightweight and just works straight away. You can still install things like Redis using HomeBrew if you need. Homestead is okay, but is a bit bloated at times. Finally, I used to develop full time on a 12" Macbook using Valet and never had any slow downs at all.

5150studios left a reply on Using Fontawesome 5 With Laravel

Hello!

are you using the standard .css file or are you using Less or Sass?

If it's just the standard .css file, just keep it in your /public/css or /public/fonts folder and then go with something like: <link rel="stylesheet" href="css/FONTAWESOME5_FILE_NAME.css" type="text/css"/> in your <head></head> section

5150studios left a reply on Phpunit Drops Database Tables

Hey dude, you probably have use Illuminate\Foundation\Testing\RefreshDatabase; in your imports. You can remove it. But it is a nice feature to have, just setup your seeders to mock out a production like database setup and it's really helpful to leave in.

5150studios left a reply on Vue-Router Append Tabs Onto URL For Sharing

@jplhomer thanks for writing in, I ended up doing a custom wizard based based on Jeff's Vue 2 course (tabs video). ended up looking like:

 <wizard>
                <wizard-step name="Project Details" :selected="true">
                    <project-details></project-details>
                </wizard-step>

                <wizard-step name="Builder Details">
                    <builder-details></builder-details>
                </wizard-step>
            </wizard>

the wizard imports:

import Wizard from '../components/Wizard';
import WizardStep from '../components/WizardStep';

Vue-Router Path

{ path: 'new?:step', component: () => import(/* webpackChunkName: "projects" */ './views/projects/New'), meta: { auth: true } },

then two components with a bunch of code to handle the url changes, clicking and next / prev buttons.

5150studios started a new conversation Clean Up Imports In Webpack

I don't recall seeing a video on this as of yet, but what's the nicest way to clean up ugly imports like this:

import Countries from "../../../forms/Countries.vue";
Vue.component("fieldCountries", Countries);

I have seen an @ being used before but wasn't sure it it's integrated / setup in webpack. What do you guys do?

5150studios left a reply on Eloquent Relationship Not Working Properly

Hey Mick it would seem to me that you are returning all ActivityUpdate rows which is why you needed to add the WHERE clause to narrow it down.

Typically you would have ActivityUpdate::with('user')->findOrFail($id); or ActivityUpdate::with('user')->where('user_id', $id)->first();

The relationship is right, you just accidentally retrieved all rows instead of narrowing it down first. You may also in your Controller function calling the eloquent query, pass in the $id of ActivityUpdate as a dependency like public function someFuncton(ActivityUpdate $activityUpdate) {} then you can go $activityUpdate->load('user'); and it'll lazy load the user in.

14 Nov
1 year ago
07 Nov
1 year ago

5150studios started a new conversation Vue-Router Append Tabs Onto URL For Sharing

Hey guys, I'm not too sure about how to solve this one after Googling it I'm stuck.

I am in a route #/projects/UUIDv4.../ and inside this component view I have a handful of tabs, I'd like to know the correct way to click on a tab and append it to the url, resulting in something that can be shared between colleagues over Slack / web etc... #/projects/UUIDv4.../files and also when the page loads fresh, that that tab is active.

The issue I'm having now is that the vue-router wants to load the component directly and I'm not sure how to get around this. Thanks in advance.

07 Nov
2 years ago

5150studios left a reply on Windows Alternative To Sequel Pro

@phpMick just in general, good name!

5150studios left a reply on Windows Alternative To Sequel Pro

@gcwilliams yeah it's solid, I had the older model with the square base and is less curved, it was awesome until half the panel died. LG took it back and upgrades me to this one. I run it via HDMI from my 12" macbook, it's great for a wider Sublime and Firefox, something about iterm2 in its Top placement fully wide is amazing too.

I'd love to go to the new 38" model but in Australia it's around $2K, this one retails for $1.4k.

All in all, productivity went up significantly from a 4K 28" and the 2x 24" I had to a MacBook Pro.

06 Nov
2 years ago

5150studios left a reply on Windows Alternative To Sequel Pro

Full disclosure @bytefury , I've already ordered 3 of the touch bar 13" with 16GB ram upgrade for my devs & I. I did purchase an XPS 15 which I used for about a week before giving it to another developer (Sequel Pro is always open for me). My daily driver is the rev A. 12" macbook attached to a 34" 34UC98 monitor - so I know the limits of performance.

I just look at that Razer Blade Stealth hooked up to a Razer Core or even the Dell XPS 13 and it's tempting to switch. I'm pretty OS agnostic, I live in Ubuntu command line daily, test sites in Windows 7 to 10 and use OS X (macos) as the foundation.

Great discussion and suggestions so far though guys, keep them coming - I'm sure this will help out many people on the fence like myself.

@willvincent that looks like a solid alternative, I will give it a crack today.

5150studios left a reply on Windows Alternative To Sequel Pro

I would happily chip in on a Kickstarter campaign for a direct copy of it for windows. It's literally the only thing holding me back now, maybe iterm2 but that's less of a deal and windows ripped off Expose from Mac so even thats there.

Sequel Pro if you haven't used it is just so quick and intuitive, all these windows suggestions are clunky, ugly and bloated. I'd even settle for a Chrome app (Postman Style) that ripped off its main interface. Any takers?

5150studios started a new conversation Windows Alternative To Sequel Pro

Hey I've exhausted my Google searching and trialing on different sql applications for Windows 10. With the new MacBook Pros out, I'm actually contemplating a windows switch after a decade on OSX. Just very underwhelming compared to other nicer hardware from Dell and Razer.

Everything I use is available for both platforms except for Sequel Pro. It really is that much better than anything else I've tried on Windows (workbench, Heidi, etc...) But has anyone seen a port or something similar as of yet?

04 Nov
2 years ago

5150studios started a new conversation Eloquent Bug Between Repository & Testing

Hey guys,

Not sure how to solve this issue at the moment, exhausted google and team members.

The following code produces the correct result when called from a Controller... perfect, no issues whatsoever.

public function categoryMonthlyBookings(Request $request = null, $status = null)
    {
        $query = Booking::join('categories', 'categories.id', '=', 'bookings.category_id');

        if (!is_null($status)) {
            $query->where('status', $status);
        }

        $query = $query->select('date', 'categories.display_name', 'categories.id AS category_id', DB::raw('count(*) as count, SUM(total) as total'))
        ->orderBy('date')
        // ->raw('GROUP BY(MONTH(date))')
        ->groupBy(DB::raw('MONTH(date)'))
        ->groupBy('category_id')
        ->get()->groupBy(function ($booking) {
            return Carbon::parse($booking->date)->format('m/Y'); // grouping by months
        });

        return $query;
    }

However when it is run via a test in the command line, it returns with:

) RepositoryTest::it_returns_all_bookings_count_and_sum_by_month_year_and_category
Illuminate\Database\QueryException: SQLSTATE[HY000]: General error: 1 no such function: month (SQL: select "date", "categories"."display_name", "categories"."id" as "category_id", count(*) as count, SUM(total) as total from "bookings" inner join "categories" on "categories"."id" = "bookings"."category_id" where "bookings"."deleted_at" is null group by month(date), "category_id" order by "date" asc)
Caused by
PDOException: SQLSTATE[HY000]: General error: 1 no such function: month

If I swap it out with that commented line using ->raw() it works in the controller & test but does not produce the right results. I'm at a loss on this one, not sure why the ->groupBy(DB::raw('MONTH(date)')) does not work in the testing environment.

All help is appreciated

30 Aug
3 years ago

5150studios left a reply on Valet Share With Custom Reserved Address

@bobbybouwmann that isn't what I was getting at all, this is purely for development. I didn't even say the word production?

5150studios started a new conversation Valet Share With Custom Reserved Address

Hey guys,

Is there anyway to use my reserved Ngrok.io domain in valet instead of it producing a custom one? The biggest issue I have is testing Twilio in my development environment because their webhooks only allow 1 address per line and I have to update it everytime I start-up Valet Share.

03 Mar
3 years ago

5150studios started a new conversation New Brisbane, AU Laravel Group

Hey guys, just letting any Aussies in Queensland know that I've started up a Laravel MeetUp group. Feel free to join in and come along to our first catch-up in a couple of weeks.

http://www.meetup.com/Brisbane-Laravel-PHP-Catch-Up/

Cheers

08 Feb
3 years ago

5150studios left a reply on Tough Regex For Routes L5.2

Update: Currently I've got this and it's working, but just hoping I could get some help to make sure it's fine-tuned

    Route::get('rent/{location}/{slug}/{item?}', ['as' => 'search.index', 'uses' => 'SearchController@index'])
        ->where([
            'location' => '[A-z-\/]*[\d\/]*',
            'slug' => '([A-z]*\/)?([A-z]*\/)?[A-z]*',
            'item' => '[^/]+$',
        ]);
07 Feb
3 years ago

5150studios started a new conversation Tough Regex For Routes L5.2

Hey guys, not strong on complex regex... I'm trying to achieve the following route to handle search and display for a directory / listing app.

What I have so far:

    Route::get('rent/{location}/{slug}/{item?}', ['as' => 'search.index', 'uses' => 'SearchController@index'])
        ->where([
            'location' => '[A-z-\/]*[\d\/]*',
            'slug' => '([A-z\d-\/_.]+)?',
            'item' => '[^/]+$',
        ]);

This gets me close with:

$location = ormeau/4208

$slug = technology/computers/accessories/macbook-air-45w-charger

but I'd like that final slash to split so $item = macbook-air-45w-charger

Also if it's possible to be selective on the amount of groups for the $slug, so if someone searches just technology/computers the same route could handle that, I couldn't work out {1,3} in regex to handle up to 3 slash groups.

**Goal: ** domian.dev/rent/ormeau/4208/technology/computers/accessories/macbook-air-45w-charger

$location = ormeau/4208

$slug = technology/computers/accessories

$item = macbook-air-45w-charger

16 Jan
3 years ago

5150studios left a reply on Important Elixir Folder Change

For anyone finding this from a Google search, here is what I did to solve it...

gulpfile.js Note the elixir.config line...

var elixir = require('laravel-elixir');

elixir(function(mix) {
    elixir.config.versioning.buildFolder = '/';

    mix.sass('app.scss');
    mix.styles('main.css');
    mix.browserify('app.js');
    mix.version(['css/main.css', 'css/app.css', 'js/app.js']);

    if (elixir.config.production) {
        mix.copy('resources/assets/images', 'public/images')
            .copy('node_modules/font-awesome/fonts', 'public/fonts');
    }

});

Bootstrap/Autoload.php included my helper file here instead of via composer.json

require __DIR__.'/../app/Helpers/views.php';
require __DIR__.'/../vendor/autoload.php';

/*
|--------------------------------------------------------------------------
| Include The Compiled Class File
|--------------------------------------------------------------------------

**.env ** Nice and handy...

...
ELIXIR_DIRECTORY=/
...

app/Helpers/views.php Taken directly from Support/Helpers.php and modded with env()

<?php

/**
 * Get the path to a versioned Elixir file.
 *
 * @param string $file
 *
 * @return string
 *
 * @throws \InvalidArgumentException
 */
function elixir($file)
{
    static $manifest = null;

    if (is_null($manifest)) {
        $manifest = json_decode(file_get_contents(public_path(env('ELIXIR_DIRECTORY', 'build').'rev-manifest.json')), true);
    }

    if (isset($manifest[$file])) {
        return env('ELIXIR_DIRECTORY', 'build').$manifest[$file];
    }

    throw new \InvalidArgumentException("File {$file} not defined in asset manifest.");
}

I hope this get's put into a config section under views.php or even app.php and then we can extend via .env from a fresh install of Laravel. The only reason I did this was to get rid of that ugly /build directory so I could just have a standard css, js, etc... folder in my /public folder.

Cheers.

25 Aug
4 years ago

5150studios left a reply on Error Using Guzzle 6 (with Laravel 5.1) To Get API Response From A Separate Laravel Instance?

Just to add to CJacobo's resolution, here is what my config/services.php looks like in projects:

'mandrill' => [
    'secret' => env('MANDRILL_API', ''),
],

and .env

MAIL_DRIVER=mandrill MAIL_HOST=smtp.mandrillapp.com MAIL_PORT=587 MAIL_ENCRYPTION=null MANDRILL_API=YourMandrillApiKeyGoesHere

01 Jul
4 years ago

5150studios left a reply on Get File Mime On Laravel 5 Filesystem

Storage::getMetaData('koala_transparent.png');