PT-83

PT-83

Member Since 11 Months Ago

Experience Points
20,470
Total
Experience

4,530 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
176
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 Created with Sketch.

    Community Pillar

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

Level 5
20,470 XP
Nov
23
1 week ago
Activity icon

Replied to Laravel 8 From Scratch?

Thanks for the reply. I think my frustration boils down to a few things.

The previous boilerplate used @extends and @yield etc. Whilst these still exist, if you want to switch to the new way then there is some learning curve, which is NOT covered by the components videos...

Also all the tailwind <x-guest-layout> and <x-slot> tags are confusing to me. Perhaps rather a new Laravel series, maybe something detailing the above would be beneficial. I got used to the Laravel 7 way of building, now it feels I'm back to square one. I can't even get views to render without Undefined variable: slot

I did figure it out, but it would be helpful if a quick video on this was available so others don't get stuck.

Nov
22
1 week ago
Activity icon

Started a new Conversation Laravel 8 From Scratch?

I think it may be beneficial to create a new Laravel from scratch series specifically focusing on Laravel 8 and all the changes. I for one would benefit a lot from such a series, and I'm sure others too. Are there any plans to do so?

Nov
14
2 weeks ago
Nov
13
2 weeks ago
Activity icon

Started a new Conversation Show Only Logged In User Their Post

Hi all,

I would like to have a user let's call him bob create a post, but then have that post only visible to bob (when logged in) and not visible to anyone else.

What's the best way I would achieve that?

Oct
18
1 month ago
Activity icon

Replied to Larvel/Jetstream/TailwindCSS Views???

Thanks to you both for the help @snapey @jlrdw

Activity icon

Replied to Larvel/Jetstream/TailwindCSS Views???

No not logged in.

Activity icon

Replied to Larvel/Jetstream/TailwindCSS Views???

@snapey I copied the code from the dashboard and moved it over. There is a header <x-slot name='header'>

<x-app-layout>
    <x-slot name="header">
        <h2 class="font-semibold text-xl text-gray-800 leading-tight">
            {{ __('/homepage') }}
        </h2>
    </x-slot>

    <div class="py-12">
        <div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
            <div class="bg-white overflow-hidden shadow-xl sm:rounded-lg">
                <x-jet-welcome />
            </div>
        </div>
    </div>
    @if (Route::has('login'))
    <div class="flex top-0 left-0 px-6 py-4 sm:block">
        <nav class="w-full">
            <ul>
                <li>
                    <a href="#" class="text-white">Home</a>
                </li>
                <li>
                    <a href="#">About</a>
                </li>
                <li>
                    <a href="#">Contact</a>
                </li>
            </ul>
        </nav>
    </div>
        <div class="hidden fixed top-0 right-0 px-6 py-4 sm:block">
            @auth
                <a href="{{ url('/dashboard') }}" class="text-sm text-gray-700 underline">Dashboard</a>
            @else
                <a href="{{ route('login') }}" class="text-sm text-gray-700 underline">Login</a>

                @if (Route::has('register'))
                    <a href="{{ route('register') }}" class="ml-4 text-sm text-gray-700 underline">Register</a>
                @endif
            @endif
        </div>
    @endif
 
</x-app-layout>
Oct
17
1 month ago
Activity icon

Replied to Larvel/Jetstream/TailwindCSS Views???

@snapey,

Why is the <x-app-layout> giving me the Trying to get property 'name' of non-object View: exception? When I remove it works without the styling of course.

I ran npm i and npm run dev?

Activity icon

Started a new Conversation Larvel/Jetstream/TailwindCSS Views???

In Laravel 8, jetstream, and TailwindCSS, the welcome page TailwindCSS isn't behaving properly. I read somewhere to create a new page and start fresh which I did.

However, even something like <div class="bg-gray-900"></div> isn't functioning like it used to, nothing changes. I did notice on the other boilerplate views they usually being with <x-app-layout> but why? What does this syntax mean? I even tried copying that over and the page breaks

Trying to get property 'name' of non-object (View:

It seems more confusing to me now than before. Does anyone know what I am overlooking?

Jul
03
5 months ago
Activity icon

Awarded Best Reply on How To Setup Multiple Sites On One Droplet With Laravel Forge?

I figured this out. It was nothing to do with forge or nginx but instead my home route.

Instead of Route::get('/home', @ controller it should have been Route::get('/', @ controller) It couldn't locate the public directory causing the 404.

Activity icon

Replied to How To Setup Multiple Sites On One Droplet With Laravel Forge?

I figured this out. It was nothing to do with forge or nginx but instead my home route.

Instead of Route::get('/home', @ controller it should have been Route::get('/', @ controller) It couldn't locate the public directory causing the 404.

Jun
30
5 months ago
Activity icon

Replied to Forge Provisioned DigitalOcean Nginx 404 Not Found

Can you explain how in more detail how you got this working in experiencing the same 404 issues.

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name ###.com;
    server_tokens off;
    root /home/forge/###.com/public;

  

    ssl_protocols TLSv1.2;
    ssl_ciphers ECDHE-RSA-AES256-GCM-SHA5SHA384:DHE-RS
    ssl_prefer_server_ciphers on;
    ssl_dhparam /etc/nginx/dhparams.pem;

    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Content-Type-Options "nosniff";

    index index.html index.htm index.php;

    charset utf-8;


    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

Activity icon

Replied to How To Setup Multiple Sites On One Droplet With Laravel Forge?

Both websites are listening to the same 443 ssl http2. But one is working other 404.

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name ###.com;
    server_tokens off;
    root /home/forge/###.com/public;

  

    ssl_protocols TLSv1.2;
    ssl_ciphers ECDHE-RSA-AES256-GCM-SHA5SHA384:DHE-RS
    ssl_prefer_server_ciphers on;
    ssl_dhparam /etc/nginx/dhparams.pem;

    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Content-Type-Options "nosniff";

    index index.html index.htm index.php;

    charset utf-8;


    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

Jun
26
5 months ago
Activity icon

Started a new Conversation How To Setup Multiple Sites On One Droplet With Laravel Forge?

I already have a digital droplet created and using it on another site. I am using laravel forge to deploy it all.

In terms of Forge, I simply added another website using the existing server which is showing me it’s functioning.

In Digital Ocean under networks, I added the other two domains @ (123.com & www.123.com). At Namecheap (where I purchased domain) I added the custom DNS ns1.digitalocean.com, 2, and 3.

But it’s still showing me a 404 when visiting the site?

Both sites are showing green on forge, but still, the second site is showing the 404. I am completely puzzled.

Activity icon

Replied to Upload Image To Existing Form

Hi @michaloravec update on this..

I pushed this to production and yet again the image upload breaks. There is not photo being rendered... Any idea why that is?

Jun
24
5 months ago
Activity icon

Replied to Using JS (Vue) In Larvel To Toggle Hamburger Button

Can you give me an example of this?

Jun
23
5 months ago
Activity icon

Replied to Using JS (Vue) In Larvel To Toggle Hamburger Button

Would this be a proper Vue registration?

window.Vue = require("vue");

Vue.component("menu", require("./components/menu.vue").default);```
Jun
18
5 months ago
Activity icon

Started a new Conversation Using JS (Vue) In Larvel To Toggle Hamburger Button

Hi all,

I am trying to get the hamburger toggle to open and close when clicked. I am using Laravel, tailwindcss, Vue, and JS.

My issue is I am confused about where to actually put the JS/Vue code.

I have js.app file, bootstrap.js file, components->exampleComponent (Vue file), but then there's also the Sass folder and files...

where would I put this logic?

const Vue = require("vue");
new Vue({
    el: "#nav",
    data: {
        isOpen: false
    },
    methods: {
        toggle() {
            this.isOpen = !this.isOpen;
        }
    }
});` 

Heres my webpack.mx.js file

const tailwindcss = require("tailwindcss");

mix.js("resources/js/app.js", "public/js")
    .sass("resources/sass/app.scss", "public/css")
    .options({
        processCssUrls: false,
        postCss: [tailwindcss("./tailwind.config.js")]
    });
Jun
16
5 months ago
Activity icon

Replied to Somehow I Lost My CSS Using Tailwind

I forgot to re-add the below inside app.scss file

@import "tailwindcss/base";

@import "tailwindcss/components";

@import "tailwindcss/utilities";

thanks @snapey

Jun
15
5 months ago
Activity icon

Started a new Conversation Somehow I Lost My CSS Using Tailwind

I wanted to install Vue in my Laravel project and did that, however, my webpack.mix.js reset. Now I pasted the code back as it was before re-run npm watch and now my CSS is gone?

Does anyone know what the issue is?

webpack

const mix = require("laravel-mix");
const tailwindcss = require("tailwindcss");

mix.js("resources/js/app.js", "public/js")
    .sass("resources/sass/app.scss", "public/css")
    .options({
        processCssUrls: false,
        postCss: [tailwindcss("./tailwind.config.js")]
    });

Layout

<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <link href="{{ asset('css/app.css') }}" rel="stylesheet">
  <script src="https://cdn.jsdelivr.net/gh/alpinejs/[email protected]/dist/alpine.js" defer></script>
  <script src ="/js/app.js" defer></script>

 
  <script src="//cdn.ckeditor.com/4.14.0/standard/ckeditor.js"></script> 
Jun
11
5 months ago
Activity icon

Replied to Best Text Editor Or Option For An User To Publish An Article

Reviving this thread as I'm sure there are some newer text editors out there. What be would one that includes image uploads?

TinyMCE is no longer free.

Activity icon

Replied to Why Does The Blog Card Repeat Itself Below (Tailwind/Laravel)?

I changed the whole codebase to fix this essentially. Got it working now.

For those who may be interested

extends('layout')
@section('title', 'Blog')

@section('content')

<!---- start of blog cards --->
 

<body class="text-cw-grey-700 ">
  <main class="container mx-auto max-w-6xl px-5">
    <article class="border-t border-cw-grey-100 flex justify-between py-10">
      <a href="#" class="w-1/2 mr-12">
        <img src="images/T-Sky.jpg" alt="" class="border-sm">
      </a>
      <div class="w-1/2 mt-4">
        <a href="#" class="text-cw-blue-300 hover:text-cw-blue-600 hover:underline text-sm mb-1 block">Link</a>
        <h1 class="mb-3"><a href="#"
            class="font-bold font-work-sans text-3xl text-cw-gray-800 leading-tight hover:text-cw-blue-600 hover:underline"></a>
        </h1>
        <p class="leading-relaxed"></p>
      </div>
    </article>

    <!--- begin posts container -->
    <div class="mt-4 grid grid-cols-3 gap-8 row-gap-6">

    <!-- iterate posts --->
@foreach ($posts as $post)
      <article>
        <a href="#">
          <img src="https://images.unsplash.com/photo-1590173872084-274b70b057a4?ixlib=rb-1.2.1&auto=format&fit=crop&w=3151&q=80"  alt="" class="mb-2">
        </a>
        <a href="#" class="text-cw-blue-300 hover:text-cw-blue-600 hover:underline text-sm mb-1 block">Text here</a>
        <h2><a href="#"
        class="font-bold font-work-sans text-xl text-cw-gray-900 hover:text-cw-blue-600 hover:underline "><a href="/posts/{{$post->id}}">{{ $post->title }}</a>
        </h2>
        <p class="text-sm leading-loose">{{ $post->excerpt }}</p>
      </article>
@endforeach

@endsection
Jun
05
5 months ago
Activity icon

Started a new Conversation Why Does The Blog Card Repeat Itself Below (Tailwind/Laravel)?

Hi all,

I have a blog template I am experimenting with but I ran into this issue of the blog post aligns vertically instead of horizontally.

How do I get the cards to line up in a 3 x3 row? https://ibb.co/8sgWd8w

index.blade.php

@section('title', 'Blog')

@section('content')

<div class="relative bg-gray-50 py-16 px-4 sm:px-6 lg:px-8">
<div class="absolute inset-0">
<div class="bg-white h-1/3 sm:h2/3"></div>
<div class="relative max-w-7xl mx-auto">
<div class="text-center">
<h2 class="text-4xl leading-10 tracking-tight font-extrabold text-gray-900 mt-10">From the Blog</h2>
<p class="mt-5 max-w-2xl mx-auto text-xl leading-7 text-gray-500">The subject matter will include Entrepreneurship, Marketing, Community, Social Media Growth and much more... </p>
</div>
</div>
</div>
@foreach ($posts as $post)
<section class="text-gray-700 body-font mt-10">
    <div class="container px-5 py-24 mx-auto">
      <div class="flex flex-wrap -m-4">
        <div class="p-4 md:w-1/3">
          <div class="h-full border-2 border-gray-200 rounded-lg overflow-hidden">
            <img class="lg:h-48 md:h-36 w-full object-cover object-center" src="https://images.unsplash.com/photo-1526657782461-9fe13402a841?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1538&q=80" alt="blog">
            <div class="p-6">
              <h2 class="tracking-widest text-xs title-font font-medium text-gray-500 mb-1">Blog</h2>
            <h1 class="title-font text-lg font-medium text-gray-900 mb-3">{{ $post->title }}</h1>
            <p class="leading-relaxed mb-3">{{ $post->excerpt }}</p>
              <div class="flex items-center flex-wrap ">
                <a class="text-indigo-500 inline-flex items-center md:mb-2 lg:mb-0">Learn More
                  <svg class="w-4 h-4 ml-2" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round">
                    <path d="M5 12h14"></path>
                    <path d="M12 5l7 7-7 7"></path>
                  </svg>
                </a>
                <span class="text-gray-600 mr-3 inline-flex items-center lg:ml-auto md:ml-0 ml-auto leading-none text-sm pr-3 py-1 border-r-2 border-gray-300">
                  <svg class="w-4 h-4 mr-1" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 24 24">
                    <path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path>
                    <circle cx="12" cy="12" r="3"></circle>
                  </svg>1.2K
                </span>
                <span class="text-gray-600 inline-flex items-center leading-none text-sm">
                  <svg class="w-4 h-4 mr-1" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 24 24">
                    <path d="M21 11.5a8.38 8.38 0 01-.9 3.8 8.5 8.5 0 01-7.6 4.7 8.38 8.38 0 01-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 01-.9-3.8 8.5 8.5 0 014.7-7.6 8.38 8.38 0 013.8-.9h.5a8.48 8.48 0 018 8v.5z"></path>
                  </svg>6
                </span>
              </div>
            </div>
          </div>
        </div>
    @endforeach
  </section>

@endsection