commish

commish

Member Since 1 Month Ago

Experience Points
4,940
Total
Experience

60 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
41
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.

Level 1
4,940 XP
May
18
2 weeks ago
Activity icon

Replied to Is It Possible To Incorporate Markdown In Your Laravel App?

Apparently the hyperlink example works with laracasts as well! haha FYI the format is encapsulating the [text] in square brackets immediately following by the (url) in parentheses

Activity icon

Started a new Conversation Is It Possible To Incorporate Markdown In Your Laravel App?

I'd love to add a little richness to what can be done in the posts for my forum website. For instance, I know in reddit you can do simple things like bold or italicize words, or with github you can make hypertext with this format hyperlinked text.

It would be great to allow hypertext for inserting images mid-post, which I think would serve great for story-telling.

What I most want to do though is provide a short-hand for hyperlinking like the github example I provide, but only allow links to webpages on my site, so perhaps they can reference/link one post in another post. I figure white-listing to only provide references to my own site (and perhaps only allowing GET routes) would make it safer than letting users go gun-ho with putting whatever link they want in the markdown.

Any suggestions? Any security concerns to consider? Thanks!

Activity icon

Replied to Learning Path

I'm a noob as well but I dove right in with laravel-from-scratch. There were some parts I got stuck because Jeffrey's dev environment was slightly different than my own (he has a mac for instance and I am on Windows), but the laracasts community is helpful enough to get you through the more difficult parts.

As for what's next for you personally, that's why it's a journey! Web development subject matter is expanse and ever-evolving, so it's extremely personal what path you take. There's no way you can learn everything (especially at once). If your intuition is that security is more important for your dream application, that's probably something to consider earlier than later. Or maybe you're guessing you have more holes with some other concept like unit-testing

May
17
2 weeks ago
Activity icon

Replied to Flexible Alternative To OrderBy()

orderByRaw worked super easily, I didn't even need the join():

$tweetsWithLikes->orderByRaw('likes - dislikes DESC')->get();

Activity icon

Replied to Flexible Alternative To OrderBy()

Thanks everyone!

Activity icon

Started a new Conversation Flexible Alternative To OrderBy()

I'm looking for a more sophisticated version of orderBy(), where I can order by the result of basic arithmetic between two colums.

Specifically, in the laravel from scratch tutorial, we eagerloaded tweets withLikes(), and fortunately you can orderBy() the eagerloaded properties ->likes and ->dislikes:

App\Tweet::all()->withLikes()->orderBy('likes', 'desc'); //orders tweets by most likes to least likes

What I would like to do is orderBy( 'likes - dislikes', 'desc') //previous query but subtracting dislikes from likes

Is there an elegant way to do this? thanks for any advice!

May
08
3 weeks ago
Activity icon

Replied to Best Practices To Minimize Database Hits

Hey @punksolid, thanks for replying! I'm actually building this from scratch starting today; it's my first laravel app that isn't relying on a tutorial, so as I create this model, I'm wondering what the best practice are for storing large data associate with a user.

For example, the profile has questions like "What do you like to study in your free-time?" And "Describe a time you did something nice for someone without expecting something in return." These questions could be answered with responses that are paragraphs long, and it seems like for example every time I grab a list of users, that it would be expensive to the database to grab these paragraphs and paragraphs every time I want the list of users.

So I guess my question is, when you simply get a list of users, does it also grab all the columns associated with a user entry in the database? For large chunks of data like the profile image or these long responses, is there a best practice to decouple these data-heavy columns from the returned user object, or is that where one-to-one relationships come in?

Activity icon

Started a new Conversation Best Practices To Minimize Database Hits

I'm completely new to backend, and the rules related to what data is retrieved from the database on which queries is lost on me. Does anybody have a great resource for best practices on model design and database queries?

For instance, I'm making a social media site where the profile asks about personal anecdotes, so several questions associated with a user could be paragraphs long. Would it be way better to have a series of 1-to-1 relationships for each of the different questions, or just store the potentially paragraph long answers with the user itself. My intuition is to do a one-to-one relationship and eager load on the occasions that I am actually retrieving those answers and listing them out...?

Thanks for any advice!

Apr
25
1 month ago
Activity icon

Commented on File Storage And Custom Avatars

What did fellow Windows devs do to work around the fact that Windows doesn't like symlinking on the virtualbox?

Apr
11
1 month ago
Activity icon

Commented on Database Notifications

What would the syntax for a mass update query be?

Apr
09
1 month ago
Activity icon

Replied to Prototype Deployment

Maybe I’m putting the cart before the horse and should completely finish the laravel6 from scratch tutorial. It seems whenever a column is added/removed, and you migrate, it clears the database. Of course there’s the production migrations that add or remove a single column without clearing databases.

Maybe i just have anxiety over the possibility of a cleared database once other people are playing around with it. Are there best practices when changing the database and models around? Anything to be aware and careful of?

Activity icon

Started a new Conversation Prototype Deployment

Bare with me, my noob will be showing pretty shamelessly here.

I’m developing a social media site and want to deploy it for a couple of friends to test out and provide feedback. However, whenever you change the database, it blows away all the generated content. The nature of my project is complex enough that i absolutely need realworld test driving experimentation to get the database relationships right in an intuitive way.

My questions are, what is best practice for this scenario? Do you just nullify new columns on existing content? Is it just the nature of the beast and an expectation i need to manage for my friends if the content does empty between major feature changes? Is there a nice backup and autofill database tool to be utilizing in case this happens? And finally do i need to keep anything in mind regarding relationships where corrupting the database might be inevitable in some cases?

Apr
07
1 month ago
Activity icon

Commented on Collections

Try it for yourself on tinker! $article->tags grabs all the tags associated with a single article, but it blows up if you try it on a collection of articles.

Activity icon

Commented on Build A Registration System In Mere Minutes

I seemed to be some combination of installing and wrestling with npm (installing on host helped), ensuring that APP_URL was correct in .env, and clearing cache and cookies for the browser. My changes didn't show up until trying with a different browser because it must cache the view retrieved by asset()

Activity icon

Replied to HALP! Laravel Mix Not Using My App.css

Also, breadcrumbs for anyone else who struggles with this issue, it probably WAS a combination of the stale browser cache AND APP_URL in the .env file not being set appropriately. If you verify that your public/css/app.css file seemed to compile okay, try a different browser, or clearing cache and cookies if you insist on a particular browser.

Activity icon

Replied to HALP! Laravel Mix Not Using My App.css

You beautiful animals, versioning did it! Incidentally, what are the best practices for cache-busting? Obviously it's got to slow down browsing any time the source files update, does it slow down web serving EVERY time? Does it save headaches during dev but is something to remove in production, or is it always good practice to apply?

Activity icon

Replied to HALP! Laravel Mix Not Using My App.css

Okay, reading that article, obviously the browser cache is different than the npm cache. I’ll try a different browser tonight and give it a go.

Activity icon

Replied to HALP! Laravel Mix Not Using My App.css

I’ll give that a try tonight. It’s curious it could be a caching issue, i keep running $ npm cache clean —force

Without luck, workaround aside. Unless there’s multiple caches that I’m not covering with npm cache clean. Im also recursively deleting node_modules regularly as i try new things

Activity icon

Replied to HALP! Laravel Mix Not Using My App.css

I have been working my way through that tutorial and it’s great! Everything has worked so smoothly until this point which is what’s such a headscratcher. It’s uncharacteristically difficult to debug compared to the rest of my laravel/laracast experience. The only thing I’ve done differently than the instructor other than deving on windows is add an extra database for a second domain in my homestead.yaml in case later tutorials came back to the first db.

Activity icon

Replied to HALP! Laravel Mix Not Using My App.css

Loading http://laravel6.test/css/app.css shows me the same erroneous css: body { color: black; }. I haven’t tried versioning yet...but at that point i figure it’s another workaround and might as well just hardcode the css to a renamed file in public with the copied contents anyway. I appreciate everyone’s help, I can try other things if people are curious enough what’s going on, but I’m personally satisfied with that work around and wouldn’t want to keep troubling the community and jumping this issue to the top of the discussion board.

Activity icon

Replied to HALP! Laravel Mix Not Using My App.css

http://laravel6.test/css/app.css is the url that's created. I made sure that APP_URL was laravel6.test, and APP_NAME was laravel6. No change.

I got the aliasing idea from this: https://dev.to/acro5piano/laravel-tips-set-resolve-alias-in-laravel-mix-6f5

I'll admit I'm groping in the dark here, I've been working with laravel for like 2 weeks, now, so please try to be a little patient if I'm describing some of the surrounding context inaccurately. That article seemed to be on the right track to me at least at the time because it was talking about the default of the source that the app uses, which I figured was pointing to the top of my shared directory, and not to the projects I created as subdirectories to the shared top level directory. I didn't know if the webpack was taking configuration information from homestead.yaml on npm run dev, and trying to find the public directory relative to one directory too high.

Apr
06
1 month ago
Activity icon

Replied to HALP! Laravel Mix Not Using My App.css

First off, I'd like to apologize if I was irritable or annoying the other day. It's rare that I work 40+ hours on a programming issue and get absolutely nowhere on it. It helped to walk away for a day.

I looked into app.blade.php header, which was ultimately where I replaced:

< link href="{{ asset('css/app.css') }}" rel="stylesheet" >

-with-

< link href="/css/try.css" rel="stylesheet" >

I give up on this now that I have a workaround. it's a much deeper issue with how webpack is aliasing app.css. If anyone has insight into where the app stores the files keyed by the urls in the asset() function:

function asset($path, $secure = null)
{
    return app('url')->asset($path, $secure);
}

That might help me trace a little better how webpack is linking things and from where it's ultimately plugging in this default css file from.

Apr
05
1 month ago
Activity icon

Replied to HALP! Laravel Mix Not Using My App.css

That’s a good idea to check, I’m afk right now but I’ll let you know if i see something interesting in the header

Activity icon

Replied to HALP! Laravel Mix Not Using My App.css

It seems to be an aliasing issue, not a stale caching issue, unless you’re saying you can leverage cache busting to point it to a manual file location

Activity icon

Replied to HALP! Laravel Mix Not Using My App.css

No, it’s something webpack does under the hood with the file name app.css specifically. It overrides the asset path or something, i think it has to do with vue.cli. The work around didn’t work until i removed the asset() helper AND renamed app.css. Reinstalling npm, rm -rd node_modules, and npm cache clear didn’t resolve app.css

Activity icon

Replied to Register.blade.php And Login.blade.php Vue Styles Not Applying

It's not ideal, but it gets the job done. Thanks!

Activity icon

Replied to Register.blade.php And Login.blade.php Vue Styles Not Applying

Hi marcosdipaolo, can you explain further "checking out" my webpack.mix.js? How do I scope my styles?

Activity icon

Replied to HALP! Laravel Mix Not Using My App.css

Does anyone possibly have enough knowledge of webpack to know what's going wrong?

Activity icon

Replied to HALP! Laravel Mix Not Using My App.css

Hi Snapey, thanks for getting back to me. Here's how I have my projects configured in homestead.yaml:

folders:

- map: C:\webcode\perspectives\Perspectives


  to: /home/vagrant/Code/perspectives

- map: C:\webcode\perspectives\laravel6

  to: /home/vagrant/Code/laravel6

sites:

- map: homestead.test

  to: /home/vagrant/Code/perspectives/public

- map: laravel6.test

  to: /home/vagrant/Code/laravel6/public

The laravel6/public/css/app.css in my code editor is compiled correctly, yes. It's not until the webpage source in the browser that the css links to that very basic body { color: black; } .css file

Activity icon

Started a new Conversation HALP! Laravel Mix Not Using My App.css

The app.scss is compiling perfectly fine, but when I inspect the .css served by my webpage, the fully compiled app.css file in my public folder is completely replaced with:

body { color: black; }

< link href="http://laravel6.test/css/app.css" rel="stylesheet" > is what I'm inspecting.

I've been at this for about a full work week now. It's INSANELY frustrating. I've looked EVERYWHERE on my filespace for this that the browser is actually pointing to and it's nowhere to be found. If anyone can help me find out what folder my browser is actually pointing to to retrieve this css, and help me force it to my public/css/app.css folder, I'll owe you my life

Activity icon

Replied to Register.blade.php And Login.blade.php Vue Styles Not Applying

This is so insanely frustrating. My project folder has the publics/css/app.css compiled exactly how it's supposed to be. When I view the websource it only shows { color: black } which i can't find literally anywhere on my filesystem.

Activity icon

Replied to Register.blade.php And Login.blade.php Vue Styles Not Applying

I've spent about 30 hours on this stupid problem. I have absolutely no idea where that default style is getting loaded in from because it's nowhere to be found in either of my projects. Does anyone know the location laravel stores the absolute final css that gets served up to the web browser?

The html is referencing:

But it's definitely not the .css in my public/css/app.css file, nor the post-compiled files in the storage folder

Activity icon

Replied to Register.blade.php And Login.blade.php Vue Styles Not Applying

thank you for replying...It appears to be a problem with the environment variables laravel mix uses are pointed to the root instead of the created projects I have as subfolders to the top shared folder: https://laracasts.com/discuss/channels/laravel/laravel-install-in-a-subfolder-the-compiled-javascript-and-css-with-version-method-cant-load-using-mix-function-in-blade

Activity icon

Replied to Register.blade.php And Login.blade.php Vue Styles Not Applying

I searched my entire project, and root for that matter, and there's no css that matches that basic default one, it must be what's generated by default when the referenced css fails. The .js and .css appear to be attempting to reference relative to the root (parent) directory

Apr
04
1 month ago
Activity icon

Replied to Register.blade.php And Login.blade.php Vue Styles Not Applying

Sorry if I wasn't clear before, I renamed app.css as app.bak, and bootstrap.css as app.css in the /public/css location as you suggested. When I view page source on the internet browser though, I'm still getting that very basic default css file (with color : black), and not the actual bootstrap.css contents

Activity icon

Replied to Register.blade.php And Login.blade.php Vue Styles Not Applying

It appears to be that webpack.mix.js is pulling in the folder path to compile from the wrong location using some sort of environment variable. i have no idea where, though...

Activity icon

Replied to Register.blade.php And Login.blade.php Vue Styles Not Applying

I did what you said, but that app.css (bootstrap renamed) in my /public folder of my project still isn't making it to my webpage; the websource is still just showing that css as:

body { color: black; }

Activity icon

Replied to Register.blade.php And Login.blade.php Vue Styles Not Applying

When I view app.js in my project:

/! no static exports found / /*/ (function(module, exports, webpack_require) {

webpack_require(/*! /home/vagrant/Code/laravel6/resources/js/app.js /"./resources/js/app.js"); module.exports = webpack_require(/! /home/vagrant/Code/laravel6/resources/sass/app.scss */"./resources/sass/app.scss");

However when I look at the page source version, it appears to point to my first project:

/! no static exports found / /*/ (function(module, exports, webpack_require) {

webpack_require(/*! /home/vagrant/Code/Perspectives/resources/js/app.js /"./resources/js/app.js"); module.exports = webpack_require(/! /home/vagrant/Code/Perspectives/resources/sass/app.scss */"./resources/sass/app.scss");

How does blade and/or webpack determine the path it uses for each of the projects? This appears to be my issue

Activity icon

Replied to Register.blade.php And Login.blade.php Vue Styles Not Applying

You're right! The css didn't compile:

body { color: black; }

I don't know how to solve this though, if I look in my project folder the app.css appeared to compile totally fine: @import url(https://fonts.googleapis.com/css?family=Nunito);@charset "UTF-8";

/*!

:root { --blue: #3490dc; --indigo: #6574cd; --purple: #9561e2; --pink: #f66d9b; --red: #e3342f; --orange: #f6993f; --yellow: #ffed4a;

...

I'm thinking it's getting something from the first project I have where I didn't install vue auth, not sure how to verify this...

Activity icon

Replied to I Can't Delete A Laravel Project

I don't know what I did differently but some combination of rm -rf and exiting out to vagrant provision worked this time

Activity icon

Replied to Register.blade.php And Login.blade.php Vue Styles Not Applying

I've tried also forcing the css/app.css to check the public folder by putting: asset('/css/app.css') with the forward slash.

I'm wondering if it could possibly have something to do with my homestead.yaml: folders: - map: C:\webcode\perspectives to: /home/vagrant/Code

sites: - map: homestead.test to: /home/vagrant/Code/perspectives/public - map: laravel6.test to: /home/vagrant/Code/laravel6/public

I added the second mapping because I wanted a second database with the second project created in the tutorial. I previously had another mapped folder like so:

folders: - map: C:\webcode\perspectives to: /home/vagrant/Code/Perspectives -map: C:\webcode\perspectives\laravel6 to:/home/vagrant/Code/laravel6

I'm wondering if it's a stale data issue that's mucking up the compilation for npm run dev or something...

Activity icon

Replied to Register.blade.php And Login.blade.php Vue Styles Not Applying

Thanks for replying, I don't know exactly how to verify if it's "pulling in the style", but here's what's in my app.blade.php:

<!-- Fonts -->
<link rel="dns-prefetch" href="//fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet">

<!-- Styles -->
<link href="{{ asset('css/app.css') }}" rel="stylesheet">
Activity icon

Started a new Conversation Register.blade.php And Login.blade.php Vue Styles Not Applying

I cannot FOR THE LIFE OF ME get the auth vue styles to apply to the register page or the home page once logged in. I'm on Windows 10 and npm works for complete garbage. Yes I've tried:

npm install && npm run dev

yarn install

npm install --no-bin-links

installing nodejs globally

ensuring nodejs and npm are in my environment

npm install with cross-env, babel-loader, sass-loader and vue-loader

downgrading npm

clearing caches and removing node_modules

EFL:AJFISNB:LDKS:FL:JEKFli;ewajfl;sjfekl;ef

deep breathing

The only thing I haven't tried is throwing my computer out the window and quitting programming forever. Any help would GREATLY be appreciated

Activity icon

Started a new Conversation Register.blade.php And Login.blade.php Vue Styles Not Applying

I cannot FOR THE LIFE OF ME get the auth vue styles to apply to the register page or the home page once logged in. I'm on Windows 10 and npm works for complete garbage. Yes I've tried:

npm install && npm run dev

yarn install

npm install --no-bin-links

installing nodejs globally

ensuring nodejs and npm are in my environment

npm install with cross-env, babel-loader, sass-loader and vue-loader

downgrading npm

clearing caches and removing node_modules

EFL:AJFISNB:LDKS:FL:JEKFli;ewajfl;sjfekl;ef

deep breathing

The only thing I haven't tried is throwing my computer out the window and quitting programming forever. Any help would GREATLY be appreciated

Activity icon

Started a new Conversation I Can't Delete A Laravel Project

My project is called laravel6 I did rm -rf laravel6 in the vbox I also deleted the folder locally on my host drive I also removed it from my .yaml configuration.

The folder does not show up on my host, but still shows up when ssh'd in. I can't create a project with the same name because "that project already exists." I don't understand why something as simple as deleting a project is so difficult...

Apr
01
2 months ago
Activity icon

Commented on Build A Registration System In Mere Minutes

I cannot FOR THE LIFE OF ME get the auth vue styles to apply to the register page or the home page once logged in. I'm on Windows 10 and npm works for complete garbage. Yes I've tried:

  1. npm install && npm run dev
  2. npm install --no-bin-links
  3. installing nodejs globally
  4. ensuring nodejs and npm are in my environment
  5. npm install with cross-env, babel-loader, sass-loader and vue-loader
  6. downgrading npm
  7. clearing caches and removing node_modules
  8. EFL:AJFISNB:LDKS:FL:JEKFli;ewajfl;sjfekl;ef
  9. deep breathing

The only thing I haven't tried is throwing my computer out the window and quitting programming forever. Any help would GREATLY be appreciated