packy

packy

Member Since 2 Years Ago

Experience Points 21,080
Experience Level 5

3,920 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 174
Lessons
Completed
Best Reply Awards 1
Best Reply
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    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 Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

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

20 Feb
14 hours ago

packy started a new conversation Minimum Job Size

I have been a freelancer for a few years now (around 6). Lately I have been doing bigger jobs, which is great, but when I quote some smaller local projects people get sticker shock. On average I do jobs in the 20k-60k range. Since they are bigger I also like to have a few clients a year, with no real overlap. My question is it okay to tell a prospective client, before a formal bid, that we have a minimum job size of like 20k? I just dont want to get their hopes up, waste my time doing a proposal (which take a while since I do some research and designs to show) and have them feeling sticker shock.

23 Jan
4 weeks ago

packy left a reply on DB Schema: Multiple Choice And Fill In The Blank Q & A

@DRFRAKER - For the “Fill in the blank” the user will supply the answer and it will only relate to that user. For the “multiple choice” the answers are pre populated by the admin so will apply to many users.

packy left a reply on DB Schema: Multiple Choice And Fill In The Blank Q & A

@TRAY2 - I get what you are saying. There will likely be a lot soon with the app launching in larger markets that are already signed up

packy started a new conversation DB Schema: Multiple Choice And Fill In The Blank Q & A

I am creating an app where one part of the application has a piece of content, say similar to a blog post, and at the bottom there is a set of questions. The questions can be multiple choice or fill in the blank. They are all required. There are no right answers. My idea is to have a simple DB structure that grabs pre populated answers if the question type is multiple choice and lets the user add an entry to the answer table if its fill in the blank. Then what ever they select or write is associated to the user in a join table:

Questions

```id  :  content_id  :  body  :  type. :  created_at  :  updated_at```

Answers

id : question_id : body : created_at : updated_at

Answer_User

```answer_id  :  user_id```

Does this seem like a good solution? Is there other ways people have done this in the past?

packy started a new conversation App Flow Design Program

Does anyone know any good programs for visually designing application workflows? Basically right now I use Mindnode 5 which works to get my flow on paper but I would like something more visually appealing to better explain how an app works to clients/investors/developers. It is super beneficial for database design and UI design to map out the whole application (flow, gateways, forms, secure areas, uploads, ect). I have seen images on other developers sites like the one below that look perfect but not sure how they were created? Is there a good program or are they just using something like Illustrator/Sketch/XD?

https://tighten.co/assets/img/case-studies/telehealth/telehealth_ia_docs_1b.jpg

08 Jan
1 month ago

packy left a reply on Server Help

@snapey Thats what I was thinking, Using Pusher to check my DB for new content and having my site pull the data from the client server every 30seconds to update my DB similar to this how you do it with a 3rd party API (https://medium.com/@jeffochoa/consuming-third-pary-apis-with-laravel-resources-c13a0c7dc945)

packy started a new conversation Server Help

I am looking at helping a company do a demo at a tradeshow by making them a website that displays a set of stats thats constantly being updated. They are concerned with running the site on their servers since they have some much going on with their current user load through various products. The thought is:

My Laravel site does an API call to their server every 30 seconds. If their server returns json with a time stamp on when it was updated If its new data I can save it in my DB I display the data from my DB The site it self is very basic. 2 images and a table of the data.

I am using Laravel and Vue to handle everything.

Is it best to save the data in a DB or just as a JSON file in the app? We are looking at 2k concurrent users for a few days. My original thought was a 16 GB 6 vCPUs 320 GB 6 TB server from DigitalOcean.

Does this seem enough? Is storing in the DB or as a file lower risk of the server failing?

Not sure if this is the right Stack Exchange site to ask, if not please let me know. I usually just use this for coding questions.

06 Dec
2 months ago

packy left a reply on Settings Package

Thanks! I would like to even make my own package to submit for everyone, but like I said I have only build for myself, never a community

packy left a reply on Settings Package

Thanks @zak . I found this: https://github.com/akiyamaSM/laravel-nova-configuration that might work pretty good or I can use it to jump off my own package (although I have never made a public one)

packy left a reply on Settings Package

@zak how would you do an image though? Would you have to paste in a URL? The other way I have done settings in the db has an actual upload option so it: uploads the image to my storage option I have set, returns the URL and then saves it into the DB. I wouldnt want a client to have to go to Digital Ocean, login, find the right folder, upload, grab the URL and then paste that into a file.

packy left a reply on Settings Package

@zak I will give it read. i usually store them in the DB so clients can easily change, lets say their address or their logo if they update their brand. Backpacks settings package their would be a field column on the table that you could set to image for instance so when you went to edit the setting it was an upload field. Made it very convenient on project handoff to give global options.

packy started a new conversation Settings Package

Does anyone know a good package or DB structure for application settings? I am coming from Laravel Backpack and they had a good one (https://github.com/Laravel-Backpack/Settings) so you could add images, text, ect. for generic site use (like site tittle, logo, description, ect). I could just make a settings table based off the backpack one but wasnt sure if there was something already out there I havent found via Google or Nova Packages

05 Dec
2 months ago

packy left a reply on Split Users And Profiles Into 2 Different Tables

@snapey that makes sense. I have just heard people splitting account information and profile information since you may not need the profile information every call. And for the Avatar thing, I know admins could have them but I have yet to build an app where any admin uses an avatar. They just put in the smallest amount of info required.

04 Dec
2 months ago

packy started a new conversation Dynamic Page Contsturction

Has anyone had any dynamic page builders with nova? In my app I have videos, links, files, questions (multiple choice), ect that are all put together to make 1 post. So as an admin when you make a "post" you should be able to add some text, then a question (from the db), a video, more text, and so on. In my mind the "Post" body field will just store basically the template the user just made with blade syntax but I am having trouble figuring out where to start. Maybe a custom tool with a bunch of "add" buttons that help generate this? Has anyone done something like this??

packy started a new conversation Split Users And Profiles Into 2 Different Tables

Is it better to always split users and profiles into 2 different tables? I always wonder this since some user information doesn't ever pertain to "admins" in my applications. For instance in one app a user with a role of "general" should have an: avatar, birthdate, motto, address and mood. For users with a role of "admin", non of this matters or will ever apply to them. So do you make 2 tables or just one and the admin users will just have some fields with NULL?

04 Nov
3 months ago

packy started a new conversation New Content

Is there a roadmap of new content coming to the site somewhere? I have seen the 5.7 videos come out, but for more advanced users there hasn’t been much. Would love to see a Nova series or more Vue.js stuff. Also very excited to see the new site. The teaser video was a month ago so I eagerly hit refresh all the time in anticipation haha.

15 May
9 months ago

packy left a reply on Best SQL Client

@m-rk no problem. Its the closest to feel I have found as Sequel Pro

packy left a reply on Best SQL Client

@m-rk I use VS Code (after years of switching around its the only one I have liked enough to stay with). After messing around with a few clients, Querious 2 has looked promising but only been messing around for a day.

packy left a reply on Best SQL Client

@m-rk Ya I have been reading through threads and waiting for an official release. Didnt know I could download a test build. Is it stable?

packy started a new conversation Best SQL Client

Currently I use Sequel Pro and find it works for what I need. I primarily use it for inspecting my DB, make a quick edit in content when developing, and exporting my data from staging to production on launch. One thing I have noticed is sometimes my tables will have a JSON column. When you export a SQL file with just the content and then try and import the data when there was a JSON column you get an error:

Cannot create a JSON value from a string with CHARACTER SET 'binary'.

This is forcing me to look at other options until they fix it. Right now I saw:

-Querious 2 -TablePlus

Anyone have any preference or suggestions for OS X? Honestly Sequel Pro is perfect besides that so something simple and native would be great.

28 Mar
10 months ago

packy left a reply on Provide Data To Component Through Prop Or Request

Okay. So if I need $data in the page as well then pass it as a prop to my Vue component too. If all I am doing is using $data for the Vue component, then do an API request.

packy left a reply on Provide Data To Component Through Prop Or Request

@rin4ik thanks. I was just getting stuck up on if it made more sense to make the Data::all(); query in my controller for the view or an API controller. I guess they do the same thing so 1 request for the page is better than 2 for page and an API

packy left a reply on Provide Data To Component Through Prop Or Request

@rin4ik is there any specific reason why? I assume less requests after page load?

packy started a new conversation Provide Data To Component Through Prop Or Request

I always find myself going back and forth on either passing my data through a prop and doing a request to an api. Is one specifically better, or faster? I know the reasoning behind an API in some cases is if I have to refresh the data but if the data is pretty much a static view should I pass it through a prop like:

<my-component :data="{{ $data }}"></my-component>

of just do a API GET request in the component?

packy left a reply on Add Wildcard Subdomains To Existing Sites

Okay for it to work you need to do 2 things:

First, set up your A record on your DNS so its host is * and it points to your server IP

Then, in your NGINX config file for the site you just need to change:

server_name mydomain.com;

to

server_name .mydomain.com;

Notice the . before the domain name. It should then work (might take a little time for the DNS to recognize it, but worked).

15 Mar
11 months ago

packy started a new conversation Forge Redirects On Children Pages

In a site on Forge on the left hand menu there is "Redirect" option. I have successfully add full url redirect but how do I target children pages?

I have done:

From: /old-page
To: /new-page
Type: Permanent

How do I do

From: /old-cat/*(all old posts slugs)
To: /new-cat
Type: Permanent 

packy started a new conversation Add Wildcard Subdomains To Existing Sites

How do I add Wildcard Subdomains to a site I already created? Do I have to edit the NGINX Config file?

I saw placing this in the server{} section: server_name ~^(.*)\.example\.com$ ; but wasnt sure. I have always used .htaccess so I am not too familiar with NGINX

07 Mar
11 months ago

packy left a reply on Forge Command Not Using Right URL

I just ran a test on production AFTER changing the APP_URL to https://mysite.com from http:mysite.com and it worked. Not sure if that was the issue or not. I also cleared config cache. Note this just send it to myself so when the scheduler does a mass one to all the users I hope it works. Dont see why it wouldnt unless it fails at some point and defaults to Localhost for some reason

packy left a reply on Forge Command Not Using Right URL

@m-rk I just made a command that sent that same notification to just me. Then uploaded it to production, SSH in and ran the command from the command line. It send me the email and correct URL.

I think this means its good and the bad URL in the env could have caused it, but I guess I will see then the scheduler runs at 11

packy left a reply on Forge Command Not Using Right URL

@m-rk it is run from Scheduler on forge. I can just create a new command that dumps the url and run it manually to test.

packy left a reply on Forge Command Not Using Right URL

@m-rk maybe that bad url in the env file caused? So since it was a command getting a notification that used url it fell back to localhost but from a controller it just used the bad url since there is no fallback?

packy left a reply on Forge Command Not Using Right URL

@m-rk hmmmm if I ssh in and go to boostrap/cache all is see when i ls is services.php

packy left a reply on Forge Command Not Using Right URL

Should I run php artisan config:cache?

packy left a reply on Forge Command Not Using Right URL

@m-rk Nope, my host returns the correct host mysite.com

packy left a reply on Forge Command Not Using Right URL

@m-rk I thought I had it in there but yes, from dev.mysite.com the command is ran and returns the correct URL from that apps env file

packy left a reply on Forge Command Not Using Right URL

@m-rk the only place in the code at all where there is localhost is in the .env.example file and in 'host' => 'localhost', in beanstalk. I dont think either should apply? I am just more baffled why it works in the dev site and from a controller but not a command since they all use the same notification

packy left a reply on Forge Command Not Using Right URL

@m-rk the url https:mysite.com/

packy left a reply on Forge Command Not Using Right URL

@mk also note I run php artisan cache:clear on my deploy script so that is not the issue.

packy left a reply on Forge Command Not Using Right URL

@m-rk I just noticed that url is incorrect but like I said that notification and url works when I run the notification manually from a controller. It only returns localhost when the notification is ran from a command.

packy started a new conversation Forge Command Not Using Right URL

This is quite frustrating. I have a command that runs a notification that uses the URL function to have a link in an email. When I use a function in controller and hit a route to send the notification the URL returns the correct link, when the command is run in dev.mystite.com the correct URL is ran, when the command is ran on the production site it returns http://localhost

The part of the notication with the URL ->action('View WOD', url( 'leagues/' . $this->league->id) );

My ENV file on production server APP_URL=https:mysite.com/

My app config file 'url' => env('APP_URL'),

What I have already checked:

-I deleted the defualt site -I deleted the scheduler that ran on the default site -I checked both env files for the 2 sites (production is https:mysite.com/ and dev is https://dev.mysite.com.com/) -I cant find any reference to localhost -Notification DO use right URL from Dev site -Notification DO use right URL on production when ran from controller -Notifications DO NOT use right URL when ran from command in production

What is going on? Where is it finding localhost and why would a notification use the right url from a controller but not a command???

04 Mar
11 months ago

packy left a reply on Delete Default Site

Perfect. I just did it and my site seems to be fine. Just wasnt sure if anything would be lost by deleting it.

packy started a new conversation Delete Default Site

I have set up my server on forge and now have my 2 domains attached (so there is default, mysite.com and dev.mysite.com). Do I now delete the "default" site? All the my repos are hooked up and databases. The reason I ask is some commands I made to schedule emails have been using the url() function and it returns the default env settings and not mysite.com ones so I think I should delete the default site. Just want to make sure that doesnt mess anything up.

01 Mar
11 months ago

packy left a reply on URL Generated In A Queue - Localhost Returned Instead Of Production Server

Thanks @natcave I just deleted the default scheduler and updated that env file too. Hopefully it works. Seems like an issue that Forge should resolve since its confusing to find that old env url

21 Feb
11 months ago

packy started a new conversation Job Opportunity

Is there any where to place a job opportunity for Laravel Developers thats free? I know about https://larajobs.com/ which seems good for when my product launches to find talent, but right now I just have a project that is done that needs a new Dev to take it over for updates, features, misc. The clients are great and pay well/on time I just dont have any more free time to keep working on it.

20 Feb
1 year ago

packy left a reply on Function To Dynamically Make Routes

@wilk_randall Thats just what I was looking for. Should have read the docs more clear

packy started a new conversation Function To Dynamically Make Routes

Has anyone ever made a function to create routes? For instance I am making a custom CRUD (cant use a stock one like Backpack since its pretty complex) but all the routes for all my models follow the same structure:

in my Admin.php (for admin routes)

Route::get('coach', '[email protected]')->name('coach');
    Route::get('coach/create', '[email protected]')->name('coach.create');
    Route::post('coach/create', '[email protected]')->name('coach.store');
    Route::get('coach/{coach}/preview', '[email protected]')->name('coach.show');
    Route::get('coach/{coach}', '[email protected]')->name('coach.edit');
    Route::post('coach/{coach}/update', '[email protected]')->name('coach.update');
    Route::get('coach/{coach}/destroy', '[email protected]')->name('coach.destroy');

    Route::get('program', '[email protected]')->name('program');
    Route::get('program/create', '[email protected]')->name('program.create');
    Route::post('program/create', '[email protected]')->name('program.store');
    Route::get('program/{program}/preview', '[email protected]')->name('program.show');
    Route::get('program/{program}', '[email protected]')->name('program.edit');
    Route::post('program/{program}/update', '[email protected]')->name('program.update');
    Route::get('program/{program}/destroy', '[email protected]')->name('program.destroy');

As you can see the routes are the exact same minus coach and program. I have like 10 more models so dont want a billion routes. Seems like a good time for a function like:

makeRoute('program', 'AdminProgramController');

and it would generate all the routes. Has anyone done this? I know it could be done, just not sure where to put it or any best practice.

15 Feb
1 year ago

packy started a new conversation Laravel HTML Table Generator

Is there any good HTML table generators for Laravel? I found https://github.com/lloricode/laravel-html-table that generates a table great by passing in my model from the controller and spitting it out in the blade template but there is no way to and a link in the table. I would image for building a CRUD admin there would be some solution where I can pass in a model like Users in a controller:

$model  = 'App\User';
        $title  = ['Name'];
        $fields = ['name'];

        
        return view('admin.dashboard',
        [
            'title' => $title,
            'model' => $model,
            'fields' => $fields
        ]);

then in the view spit out a table with a link to the id:

{!! Table::generateTableFromModel(
                $title, 
                $model,
                $fields, 
                20) 
            !!}   

            {{ Table::links() }}
12 Feb
1 year ago

packy left a reply on Scheduler Isnt Running Commands

I got it working. I had another scheduler that was bogus on the same server so it looked like it prevented this one to run. When I deleted the bogus one I started getting the expected output.

packy started a new conversation Scheduler Isnt Running Commands

I have 4 commands that work locally by running php artisan schedule:run but when I set up my Forge scheduller they never run??

My site lets say is called dev.coolsite.com. So I have my scheduler going every minute 245270 Every Minute * * * * * forge php /home/forge/dev.coolsite.com/artisan schedule:run. But nothing ever runs. I know the commands are correct because they run locally. What is going wrong?

09 Feb
1 year ago

packy started a new conversation User Avatar: Store URL Or Generate

I was in a discussion with @arthurvillar about adding avatar field to the user database. He mentioned he doesn't store the url path but generates it:

"Well, if you can make a unique filename based on the user's name (or a username) why would you add another column for that? On the model you can add a getAvatarAttribute (or even just a simple function) and create a simple logic to have that name included in your object without having to worry about it in creating, updating, validating, etc."

I always stored the full url path to my Spaces bucket in avatar field on the user table. Is there any benefit to using one way or the other? Or a best practice?