tovisbratsburg

Member Since 5 Months Ago

Byron Center, Michigan

Experience Points
30,190
Total
Experience

4,810 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
268
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.

  • Community Pillar

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

Level 7
30,190 XP
Apr
21
3 weeks ago
Activity icon

Replied to Denormalization

Thanks, I'll keep thinking on it, there has to be a better approach.

Activity icon

Started a new Conversation Denormalization

If I create a denormalized table in MySQL to help speed up things. Is there a naming convention for that table and model in Laravel?

Apr
20
3 weeks ago
Activity icon

Commented on Show All Posts Associated With A Category

Will there be more to 8 from scratch?

Apr
15
4 weeks ago
Activity icon

Commented on Find A Composer Package For Post Metadata

This is so much nicer than learning an older version of Laravel, then learning things that don't work in that anymore and learning the new things :-). Thanks for doing 8 from scratch!

Apr
14
4 weeks ago
Activity icon

Started a new Conversation View That Uses Multiple Models

I'd need to have a view use multiple models and don't know the best approach in Laravel. Do I access mutiple models through one controller, or do I have a main controller load the view and and that view fetch more data from other controllers? I've been scouring the internet to find controllers that use multiple models, and have not found much which might indicate that there is another way.

I have a Job Edit View that will have a Customer dropdown, Status dropdown.

Outside the framework I know how to do it in php and mysql.

Anybody know a best practice?

Activity icon

Replied to Multiple Models In Contoller

I think jlrdw nailed it and I am just overthinking it.

Activity icon

Started a new Conversation Multiple Models In Contoller

Is there a standard naming convention for a controller when it utilizes multiple models?

Activity icon

Started a new Conversation Models In Subdirectories

Is it okay to put models in sub-directories to keep things organized, or isn't this advisable?

Activity icon

Commented on The New Models Directory

Can you place models in sub directories?

Feb
26
2 months ago
Activity icon

Replied to Query Not Giving Expected Result In Laravel

Do you have the migration schemas-tables that you could paste and what specifically you want to do? That way I can see what the tables look like you are trying to work with.

Activity icon

Replied to Query Not Giving Expected Result In Laravel

Are you able to do the query outside of Eloquent in something like MySQL on Workbench to get it to work how you want? My mind for something this complex gravitates to stitching it together in mysql and looking at it that way.

Activity icon

Commented on A Full Example

I have a report that I'd like to make changes to via a modal. The report takes some time to process with php. I'd like the whole page to refresh after a modification, but don't want it if you hit cancel or when you open the modal. When you open a modal, does it refresh the whole page to where it would reprocess the form prior to opening the modal, or does it just open the modal using livewire and alpine? I'm new to livewire :-)

Activity icon

Replied to MySQL Or Eloquent

Awesome thanks! I'll check it out :-)

Activity icon

Replied to Stored Procedure-Based Models

Is there a way to work with Stored Procedure-Based Models with Laravel 8?

Activity icon

Replied to MySQL Or Eloquent

I found this, but its from 6 years ago and didn't go anywhere.

https://laracasts.com/discuss/channels/general-discussion/stored-procedure-based-models

Activity icon

Replied to MySQL Or Eloquent

So migration files do more than creating/dropping database tables, stored procedures, views, and manipulating data in them when php artisan migration is run?

I already have my migration file creating stored procedures and such with sql I also use it to manipulate data in the databases.

Activity icon

Replied to MySQL Or Eloquent

Sorry, you had me confused when you said your model class is php.

I thought the migration files just handled creating database tables, stored procedures, views, and manipulating data in them when php artisan migration was run.

Activity icon

Replied to MySQL Or Eloquent

So I just add

public function up() {
	...
}

public function down() {
	...
}

To this?

<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Sample extends Model
{
    use HasFactory;
}
Activity icon

Replied to MySQL Or Eloquent

Do you know of any reference that explains how to out them in the model?

Activity icon

Replied to MySQL Or Eloquent

Could models based upon MySQL views or stored procedures give the best of both worlds? The MySQL Database handles the tough stuff through the MySQL View or Stored Procedure and all of the binding and everything still comes alive with the Laravel model.

Feb
25
2 months ago
Activity icon

Started a new Conversation MySQL Or Eloquent

I've been using MySQL for a while now and am pretty comfortable with it. I find myself using DB::unprepared() for Stored Procedures with a lot of the complex stuff just letting the database do its thing. Is there an advantage to using Eloquent in Laravel if your comfortable with just using MySQL?

Activity icon

Replied to Laravel Sail MySQL Not On Localhost?

I use docker, only without Sail. Does everything work but when you do a migration also can you connect via MySQL workbench?

Activity icon

Replied to VM Windows 10 For Laravel

I've only seen Windows Server on Google Cloud. Perhaps the reason Windows 10 is hard to find or non-existent is due to Microsoft's licensing.

https://cloud.google.com/compute/docs/instances/windows/creating-managing-windows-instances

Activity icon

Replied to Upload Laravel To Shared Hosting

Curious, which shared hosting company are you using?

Feb
24
2 months ago
Activity icon

Started a new Conversation Integration With UPS Worldship

Does anybody have an app Laravel app they created that UPS Worldship connects to for a Key Import? I want to use an odbc to connect to my apps API. Do you know of a good odbc driver that does this?

Feb
23
2 months ago
Activity icon

Started a new Conversation Stored Procedure Based Models

I am already using DB::unprepared() to call and create stored procedures, but is there a way to create a relationship with a Model and Stored Procedure vs the typical Model and Table?

Feb
22
2 months ago
Activity icon

Replied to No-No Table Names In Laravel

That sounds like a perfect idea!

Activity icon

Replied to MySQL Stored Procedures

Worked like a charm, thank you so much.

<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class Jobs extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('users', function (Blueprint $table) {
            $table->id();
            $table->string('name');
            $table->string('email')->unique();
            $table->timestamp('email_verified_at')->nullable();
            $table->string('password');
            $table->rememberToken();
            $table->timestamps();
        });

        Schema::create('password_resets', function (Blueprint $table) {
            $table->string('email')->index();
            $table->string('token');
            $table->timestamp('created_at')->nullable();
        });

        Schema::create('failed_jobs', function (Blueprint $table) {
            $table->id();
            $table->string('uuid')->unique();
            $table->text('connection');
            $table->text('queue');
            $table->longText('payload');
            $table->longText('exception');
            $table->timestamp('failed_at')->useCurrent();
        });
        //VOS
        Schema::create('jobs', function (Blueprint $table) {
            $table->id();
            $table->text('customer');
            $table->text('project');
            $table->text('contact');
            $table->text('billing');
            $table->text('reference');
            $table->text('project_manager');
            $table->text('salesperson');
            $table->timestamps();
        });
        //Import Old
        DB::unprepared('
        CREATE PROCEDURE jobs_old()
            BEGIN
            CREATE TABLE laravel.jobs_old SELECT * FROM old.data_jobs;
            INSERT INTO laravel.jobs (`id`, `customer`, `project`, `contact`, `billing`, `reference`,`project_manager`,`salesperson`,`created_at`,`updated_at`)
            SELECT `jobnumber`, `customer`, `project`, `contact`, `billing`, `reference`,`pm`,`salesperson`,`modified`,`modified`
            FROM laravel.jobs_old;
            END
        ');
        DB::unprepared('CALL jobs_old()');
    }
    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('users');
        Schema::dropIfExists('password_resets');
        Schema::dropIfExists('failed_jobs');
        Schema::dropIfExists('jobs');
        Schema::dropIfExists('jobs_old');
        DB::unprepared('DROP PROCEDURE IF EXISTS jobs_old');
    }
}


Activity icon

Replied to No-No Table Names In Laravel

Awesome, so to change jobs for instance, all I would need to do is change this?

    'database' => [
        'driver' => 'database',
        'table' => 'laravel_jobs',
        'queue' => 'default',
        'retry_after' => 90,
    ],
Activity icon

Replied to MySQL Stored Procedures

Perhaps I can move the old into the new as jobs_old do an INSERT INTO SELECT into jobs then remove jobs_old.

CREATE DEFINER=root@% PROCEDURE jobs_old() BEGIN CREATE TABLE laravel.jobs_old SELECT * FROM old.data_jobs; END

Activity icon

Started a new Conversation No-No Table Names In Laravel

Curious, are there any Table Names that I'll want to stay away from. I have jobs, so I want to be able to create a table named jobs, but it looks like queue in laravel might create its own down the road. Is there a list of table names I want to stay away from, or better yet, a way to rename laravel's so I can use my own table names?

Activity icon

Replied to MySQL Stored Procedures

I see, that is interesting.

What I am also doing is taking a database I have stored as a different name, and making it make more sense by including indexes, foreign keys, and more pivot tables to reduce the amount of columns on some of my tables in a separate database. When I migrate:refresh, is there a way after pull data from my old database into the one I am working on that is widely used? If not would an unprepared INSERT INTO SELECT work best?

Activity icon

Replied to MySQL Stored Procedures

I read through that link and others prior to posting this. This deals with a select, Stored Procedures can deal with update, insert, delete and multiple lines of those. Is it okay to use Select for all of those or is what @guybrush_threepwood mentioned better?

Activity icon

Started a new Conversation MySQL Stored Procedures

Stored Procedures are a good way of letting your mysql server handle complex queries and such. Stored Procedures can have in out and inout within the call. Is there a good way of working with all 3 in Laravel 8, or do you have to write something custom into Laravel to work with Stored Procedures?

Or, am I overthinking it and you just use something like: DB::select('call...', [1]);

Feb
16
2 months ago
Activity icon

Replied to Sail For Production Server?

https://laracasts.com/series/whats-new-in-laravel-8/episodes/12

Looks like some of the things on this hint that its not such a hot idea. Sounds like it doesn't use a webserver like Apache, it just relies on php artisan serve.

Activity icon

Started a new Conversation Sail For Production Server?

Can Laravel Sail be used for production, or is its intent just for a local environment? I plan to use Docker for both local and production. I've already built stuff with Docker without using Sail - wondering if there is an advantage to Sail and if it can be used for both?

Feb
11
3 months ago
Activity icon

Replied to Google Cloud Storage Bucket

If I am using a Google Cloud vm, I wonder if I can mount the cloud bucket in the vm and go that route with GCSfuse.

Activity icon

Started a new Conversation Google Cloud Storage Bucket

Looking for ways to upload/save a file into a Google Storage Bucket from Laravel. Anybody able to point me in a direction?

Activity icon

Replied to Docker Questions

I think I figured out Ubuntu VM

Feb
10
3 months ago
Activity icon

Commented on Manage Your Local Dev Environment With Docker

Has or can laracast expand upon Docker for Laravel?

Feb
08
3 months ago
Activity icon

Started a new Conversation Docker Questions

I am new to Docker, and like the idea for Larvel. I want to install it in Google Cloud. Does it work best to install it on a Google Cloud Container Optimized OS vm or a Ubuntu vm?

Feb
02
3 months ago
Activity icon

Commented on TodoMVC With Alpine: Part 2

Without storing into a database, is there a way to store the todos if they hit refresh or go to another page and come back?

Jan
31
3 months ago
Activity icon

Commented on Contact Form With Validation

Would that be the TALL stack?

Jan
29
3 months ago
Activity icon

Replied to Parallax With Vue

Have you used this and found it works across most browsers?

Warning: This article uses experimental CSS properties that do not work across browsers. This project has been tested and works on Chrome. This technique doesn’t work well in Firefox, Safari, and iOS due to some of those browsers’ optimizations.

Activity icon

Replied to Parallax With Vue

Wow, I will have to try this - thanks a million.

Activity icon

Started a new Conversation Parallax With Vue

I just started learning Vue.js. I have a site that uses the following. Is there a way I'll be able to do this with Vue down the road instead of jquery and parallax.js?

https://pixelcog.github.io/parallax.js/

Activity icon

Commented on Forgot Password And Reset Password

Are there files for download over this somewhere?