tovisbratsburg

Member Since 2 Months Ago

Byron Center, Michigan

Experience Points
26,320
Total
Experience

3,680 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
233
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 6
26,320 XP
Feb
26
2 days 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
3 days 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
4 days 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
5 days 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
6 days 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
1 week 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
2 weeks 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
2 weeks ago
Activity icon

Commented on Manage Your Local Dev Environment With Docker

Has or can laracast expand upon Docker for Laravel?

Feb
08
2 weeks 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 weeks 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
4 weeks ago
Activity icon

Commented on Contact Form With Validation

Would that be the TALL stack?

Jan
29
4 weeks 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?

Jan
27
1 month ago
Activity icon

Replied to Apache Settings

Thanks, routes were not working so I switched it to this:

<Directory /var/www/laravel/public/>
	Options Indexes FollowSymLinks
	AllowOverride All
	Order allow,deny
	allow from all
	Require all granted
</Directory>
Jan
26
1 month ago
Activity icon

Started a new Conversation Apache Settings

Which is correct, or are both wrong?

    ServerAdmin [email protected]
    DocumentRoot /var/www/laravel/public

    <Directory /var/www/laravel>
	Options Indexes FollowSymLinks
    	AllowOverride All
    	Require all granted
</Directory>

-or-

    ServerAdmin [email protected]
    DocumentRoot /var/www/laravel/public

    <Directory /var/www/laravel/public>
	Options Indexes FollowSymLinks
    	AllowOverride All
    	Require all granted
</Directory>
Jan
17
1 month ago
Activity icon

Replied to Allowing .zip Files To Be Uploaded

For the user, zipping the files for upload reduces file size for transfer and is generally done when FTPing or Emailing indesign to keep them together.

I am going to explore clamAV.

Jan
16
1 month ago
Activity icon

Replied to Allowing .zip Files To Be Uploaded

I sort of have this, it uploads whitelisted files into a temporary folder. After 5 min it zips files the files they uploaded, after another 5 minutes it sends that zipped folder to the cloud bucket and notifies production a folder is ready, a week later it cleans them from the temp folder.

Maybe I am worried about nothing, just a lot of things say be very careful allowing people to upload certain file types.

Activity icon

Replied to Allowing .zip Files To Be Uploaded

Awesome, I'll check this out! It might be the perfect solution.

https://www.clamav.net/

Activity icon

Replied to Allowing .zip Files To Be Uploaded

"They may contain malicious files or a .zip bomb." I'd like the ability to scan them or figure out a way to make sure they are not a threat.

Jan
14
1 month ago
Activity icon

Replied to Allowing .zip Files To Be Uploaded

Files to print. The website I created automatically zips all of the whitelisted files and sends them to a Google Cloud Bucket. The thing is, in the large format print industry people are used to handing over files in that are zipped already. Indesign files in particular are usually sent with linked files that folks zip.

Jan
13
1 month ago
Activity icon

Started a new Conversation Allowing .zip Files To Be Uploaded

I have .zip files blacklisted among other file types on a website uploader because they may contain malicious files or a .zip bomb. Is there a safe way to allow .zip files to be uploaded, or is it safe and I am just thinking its not?

Jan
07
1 month ago
Activity icon

Replied to Multiple Websites Under Single Laravel App

Thanks makes sense. Is this what you would call a multi-tenant architecture?

Activity icon

Started a new Conversation Multiple Websites Under Single Laravel App

I have 3 websites that will all share the same database and a lot of the same functionality. Is there a way to route by domain names? Or is this a bad practice and I should just create 3 apps that share the same database and use apache to multi-host them?