Member Since 2 Months Ago
Byron Center, Michigan
3,680 experience to go until the next level!
In case you were wondering, you earn Laracasts experience when you:
Earned once you have completed your first Laracasts lesson.
Earned once you have earned your first 1000 experience points.
Earned when you have been with Laracasts for 1 year.
Earned when you have been with Laracasts for 2 years.
Earned when you have been with Laracasts for 3 years.
Earned when you have been with Laracasts for 4 years.
Earned when you have been with Laracasts for 5 years.
Earned when at least one Laracasts series has been fully completed.
Earned after your first post on the Laracasts forum.
Earned once 100 Laracasts lessons have been completed.
Earned once you receive your first "Best Reply" award on the Laracasts forum.
Earned if you are a paying Laracasts subscriber.
Earned if you have a lifetime subscription to Laracasts.
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.
Earned once you have achieved 500 forum replies.
Earned once your experience points passes 100,000.
Earned once your experience points hits 10,000.
Earned once 1000 Laracasts lessons have been completed.
Earned once your "Best Reply" award count is 100 or more.
Earned once your experience points passes 1 million.
Earned once your experience points ranks in the top 50 of all Laracasts users.
Earned once your experience points ranks in the top 10 of all Laracasts users.
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.
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.
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 :-)
Replied to Stored Procedure-Based Models
Is there a way to work with Stored Procedure-Based Models with Laravel 8?
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
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.
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.
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;
}
Replied to MySQL Or Eloquent
Do you know of any reference that explains how to out them in the model?
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.
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?
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?
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
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?
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?
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');
}
}
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,
],
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
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?
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?
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?
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]);
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.
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?
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.
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?
Commented on Manage Your Local Dev Environment With Docker
Has or can laracast expand upon Docker for Laravel?
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?
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?
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.
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?
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>
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>
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.
Replied to Allowing .zip Files To Be Uploaded
Looks like this might be an option too:
https://laravel-news.com/clamav-anti-virus-validator-for-laravel
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.
Replied to Allowing .zip Files To Be Uploaded
Awesome, I'll check this out! It might be the perfect solution.
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.
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.
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?
Replied to Multiple Websites Under Single Laravel App
Thanks makes sense. Is this what you would call a multi-tenant architecture?
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?