Ty

Ty

Member Since 1 Year Ago

Experience Points 9,500
Experience Level 2

500 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 64
Lessons
Completed
Best Reply Awards 3
Best Reply
Awards
  • start-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-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-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist 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.

02 Aug
2 weeks ago

Ty left a reply on Add A Div Every X Number If Items

This is exactly what I was looking for! I'm going to study this code now since I have a base and see how I can refactor to filter in the controller instead since that is what you have suggested as a better route to pursue.

Ty left a reply on Add A Div Every X Number If Items

@snapey So what i'm trying to do is I have services which show content plus show service listings. So what I was trying to do is bring in the services and only show the services that have a category title that matches the page title. which is does currently. I then wanted to take the service listing list that is displayed on the page and make lists of 4 in each column. I hope this makes more sense now of what i'm trying to achieve. I could be totally going at this the wrong way.

Ty left a reply on Add A Div Every X Number If Items

@cronix here is my current code as following.

<div class="serviceListingColumn">
                <ul>
                @foreach($serviceListings as $serviceListing)
                @if ($serviceListing->service_category == $services->title)
                    <li class="serviceListingItem">{{$serviceListing->service_name}}</li>
                @endif
                @if($loop->iteration % 4 === 0)
                    </ul>
                </div>
                <div class="serviceListingColumn">
                    <ul>
                @endif
                @endforeach
            </ul>
        </div>

Ty left a reply on Add A Div Every X Number If Items

@jlrdw the problem is I have 10 items in my list. Which leaves a remainder of 2.5. I'm asking how do I handle the remainder so it doesn't add two blank divs are the end?

Ty left a reply on Add A Div Every X Number If Items

@neven this works great. The only issue I cannot seem to resolve is it seems to leave a blank <div class=""></div> at the end and I cannot seem to figure out why. Could anyone shed some light on this issue?

01 Aug
2 weeks ago

Ty left a reply on Add A Div Every X Number If Items

I actually have never used this before. Can someone give me a little more of an example so I can see how I need to structure this? I was able to get it to chunk correctly but it leaves two empty <div class="row"></div>. Now that the other method was suggested I would like to try to it this way since everyone seems to be in agreement this is the correct way rather than chunk.

Ty left a reply on Add A Div Every X Number If Items

@jlrdw i've been messing with it for about 4 hours and ran out of senarios.

Ty left a reply on Add A Div Every X Number If Items

I tried this and it prints out on the screen put it also has several empty arow at the end.

@foreach ($serviceListings->chunk(3) as $chunk)

     @foreach ($chunk as $product)
         <div class="row">

                    @if ($product->service_category == $services->title)

                    <li class="serviceListingItem">{{$product->service_name}}</li>


                @endif
                </div>
                @endforeach

        @endforeach

                

Ty started a new conversation Add A Div Every X Number If Items

I have data that is being output into the view and it is working great. But I need a way to group the items. I would like to be able to wrap every 4th item with a div. I have tried using chunk but have gotten errors.

my controller is as follows. Service listing is the one i'm using to get a list of service listings.

public function show($slug) {
        $serviceListings = ServiceListing::get();
        $services = Service::where('slug', $slug)->firstOrFail();

        return view('services.show')->with('services', $services)->with('serviceListings', $serviceListings);
}

my view looks like this. I can get chunk to work correctly but once I put the if statement in there to check for service category it tells service_category it not a instance of this collection.

<div class="servicesListingWrapper">
            <h3>Some of the services we offer.</h3>
            <div class="servicesListing">
            <div class="serviceListingColumn">
                <ul>
                @foreach($serviceListings as $serviceListing)
                @if ($serviceListing->service_category == $services->title)

                    <li class="serviceListingItem">{{$serviceListing->service_name}}</li>


                @endif
                @endforeach
            </ul>
        </div>
    </div>
        </div>
24 Jul
3 weeks ago

Ty left a reply on When I Open My "index.blade.php" File In The Browser, It Shows The Php Code Instead Of Executing The Php Code

You shouldn't be trying to open a file in the browser using .blade.php. Laravel will translate that for you in the browser. You can either use routes or controllers to access views. I would suggest watching a few up and running with laravel tutorials. This will help you to understand how laravel and MVC works. https://laracasts.com/series/laravel-from-scratch-2018

23 Jul
3 weeks ago

Ty left a reply on Error Migrating Tables For Bitfumes/laravelAuth Package On Laravel 5.8

add use Illuminate\Support\Facades\Schema;

so it looks like this

use Illuminate\Support\Facades\Schema;

public function boot()
{
    Schema::defaultStringLength(191);
}
19 Jul
4 weeks ago

Ty left a reply on In Shared Hosting Environment, How To Hide .env File From Public?

@yougotnet the way a laravel installation works is instead of using public_html laravel uses public instead. So you have to look at it that way and you will see that the .ENV file is outside of the public folder which makes it inaccessible and secure. I hope this helps you out.

Ty left a reply on In Shared Hosting Environment, How To Hide .env File From Public?

@jlrdw Not sure how putting your project on the same level as public_html is very unsecure? Consider this scenario and correct me i'm wrong.

home/user
    -public_html -> home/user/source/public (symlink)
    -source(laravel files)

if this is unsecure and incorrect let me know because i've done it wrong on many sites.

Ty left a reply on Bluehost Hosting Service To Laravel

just a VPS would be great. You can get a cheap VPS anywhere. Not really any host that offers integration.

18 Jul
1 month ago

Ty left a reply on In Shared Hosting Environment, How To Hide .env File From Public?

Put everything on the same level as public_html and then create a symlink between public_html and the public folder in your laravel install.

Ty left a reply on Run Artisan Commands On Production Server

Have you installed Composer, or Laravel on this server? PLEASE BE EXPLICIT WITH YOUR ANSWERS, SO I CAN EASILY UNDERSTAND. THANK YOU

16 Jul
1 month ago

Ty left a reply on Laravel 5.7 | External Server Router Error

Why is this looking in public_html for this file? This file should never be in your public_html folder. You need to upload your installation correctly outside of the root or your leaving yourself wide open. Here is a good walk through https://www.5balloons.info/hosting-laravel-5-5-project-on-shared-hosting-hostgator/ or you can throw your installation in the root and create a symlink to point to your public_html.

28 Jun
1 month ago

Ty left a reply on New Laravel Media Package

Looks like a really good start.

27 Jun
1 month ago

Ty left a reply on Backpack PageManager InvalidArgumentException View [pages.normal] Not Found

glad you were able to get this solved. Please mark as solved.

Ty left a reply on 503 Service Unavailable For A Package When Deploying On Shared Hosting

if you have Cpanel Access then you need to configure your FastCGI timeout to be longer. The issue is with this and not on the laravel side of things.

Ty left a reply on 503 Service Unavailable For A Package When Deploying On Shared Hosting

Remove the enablereuse=on option on your Proxy line, so that it reads

<Proxy fcgi://mywebsite/ retry=0>

See if this works. Not sure if you have access to do this or not.

26 Jun
1 month ago

Ty left a reply on Laravel Passport | Login/Register Redirects To Welcome Page

This is how Laravel's authorization works. You login and then you are redirected. https://laravel.com/docs/5.8/authentication#included-routing you can also view this tutorial to learn more about redirection https://codeburst.io/learn-how-to-redirect-authenticated-users-to-corresponding-path-in-laravel-dd613e2f9e3

Ty left a reply on Backpack PageManager InvalidArgumentException View [pages.normal] Not Found

It's telling you that your missing your view file which would be /pages/normal.blade.php in your views folder.

return view('pages.'.$page->template, $this->data); in your page controller sets this.

Ty left a reply on Config Laravel Installation On Ubuntu

did you add this? $HOME/.config/composer/vendor/bin ?

25 Jun
1 month ago

Ty left a reply on How To Add Custom Menu In Voyager Laravel?

The first code is if you just want to use the menu using their default styling with bootstrap.

Menu::display('main', 'bootstrap');

The following code block allows you to add custom styling to your menu out of the box. If you wish to use this code block you would place this

<ul>
    @foreach($items as $menu_item)
        <li><a href="{{ $menu_item->url }}">{{ $menu_item->title }}</a></li>
    @endforeach
</ul>

in a blade file resources/views/my_menu.blade.php. then you would display it in your view file where you want it to display. using Menu::display('main', 'my_menu');

Ty left a reply on Using Atom Editor

What type of tests are you trying to perform?

20 Jun
1 month ago

Ty left a reply on Sublime, Not Best Tool For Larger Projects And Debugging?

I use sublime for all of my projects. I know many developers prefer PHP Storm, but I find Sublime does just fine for me. I can get by usually by using DebugBar for debugging.

Ty left a reply on Upwork Clone That Is Build In Laravel?

Everything that is wrong with this.... If the client wants a quality product they need to pay for the time and effort put into said project. If they want it quick and cheap, it won't be quality. If they want quality it won't be quick and cheap. I would inform and educate your client, if they don't like that solution, move on.

Ty left a reply on Laravel

Bootstrap imports the bootstrap files in the installation. Are you needing the actual uncompiled files for any particular reason?

19 Jun
1 month ago

Ty left a reply on How To Change Password?

You have received an answer. Simply asking for coding is not encouraged. Try to do the code yourself and then whenever you run into an issue, then ask for assistance. But jumping on here demanding for free coding for your project is not the way to go. Laravel has a learning curve and seeing you have only completed one lesson I can understand why you are lost on how to accomplish simple tasks in Laravel. I would suggest like many other have and say you need to take a step back and learn laravel, attempt some personal projects before jumping into a paid laravel gig. I maybe out of line and others may disagree, but I feel laravel as a profession is not for you until you have a good understanding of how the innerworkings of laravel work for starters.

13 Jun
2 months ago

Ty left a reply on How To Test Why My View-Composer Isn't Working

First I would add the view facade before the service provider in ComposerServiceProvider

Ty left a reply on Laravel Error 500, Welcome Page Not Loading

@gemilyd you need to read my comment and this will fix your issue. You cannot use a .env.example.

Ty left a reply on How To Make Links Clickable

If you could post some code or more of an explanation of what you're looking for we can help more. Your request is a little vague on what you're actually trying to achieve.

Ty left a reply on Sending Variable To All Blade Views

you're going to want to look at https://laravel.com/docs/5.8/views#passing-data-to-views and you will see how to use view composers to achieve this.

Ty left a reply on Welcome.blade.php Not Working

I would suggest following along with a video tutorial such as https://laracasts.com/series/laravel-from-scratch-2018 to learn more about laravel, the setup process and the coding process before trying to dive in head first. Laravel does have a learning curve and not something that can be dove into right off the bat.

Ty left a reply on Welcome.blade.php Not Working

How are you trying to access your laravel install? Are you working on a local environment? If so how is your local environment setup?

Ty left a reply on Laravel Error 500, Welcome Page Not Loading

you need to have an .env laravel does supply a .env.example as just a boilerplate example. You need to make sure you have a .env that is configure to your actual setup you wish to have. This is also where you will set your database variables.

12 Jun
2 months ago

Ty left a reply on SQLSTATE[42S02]: Base Table Or View Not Found: 1146 Table

Did you also make sure the migration table was empty as well? I have ran into this issue before where if the migrations table still had data I had this error.

06 Jun
2 months ago

Ty left a reply on How To Create Table In Database Without Migrations ?

You want to create a database table for each user? That sounds pretty database heavy and probably not a good idea.

05 Jun
2 months ago

Ty left a reply on 404 | Not Found

please mark as solved.

04 Jun
2 months ago

Ty left a reply on Homestead, Serve, Separate Linux Box/VM? How Do You Work?

I use WAMP for PHP and MySQL and then in my computers document folder is where I create my projects and just run the project in my browser using php artisan serve and 127.0.0.1:8000 I'm sure everyone has there own way though.

Ty left a reply on Class 'Form' Not Found

Please make sure you have installed LaravelCollective for this to work. I think everyone is moving away from using LaravelCollective since they have decided to no longer maintain or provide support. You could always just use HTML5 forms in place.

23 May
2 months ago

Ty left a reply on Edit Blade View

@wuschelino22 everything good now? If so please mark as solved.

Ty left a reply on Edit Blade View

change your edit form to read like this.

<form class="form-horizontal" role="form" method="POST" action="{{ url('shares', $shares->id) }}">
    {{ csrf_field() }}
    {{ method_field('PATCH') }}

Ty left a reply on Edit Blade View

can you show more of your controller? something is missing. Did you create the controller manually or did you create it through artisan using --resource

22 May
2 months ago

Ty left a reply on Edit Blade View

@wuschelino22 why do you still have Request $request? remove that and just have $id your request should be on your update method.

Ty left a reply on Which Editor Do You Use To Work?

I use sublime. I like the packages it has to offer. Also, I guess I just like it out of force of habit. I have also used Atom and like it as well.

Ty left a reply on Where To Put Logic In Laravel?

Logic would be good in your controllers. But if your controllers are getting to out of handle then you'll want to look into service files you can reuse in cases when you need them.

Ty left a reply on Edit Blade View

Your edit should be really simple and doesn't require a request. your request is done on the

public function update(Request $request, $id) {.......}

public function edit($id) {
       $shares = Url::findOrFail($id);
       $categories = Categorie::get();  

       return view('users.edit', compact('shares'));

   }

Ty left a reply on Edit Blade View

Is there a reason you are using a for foreach in your edit view? You are looping through each shares. you should pass the id and then present the edit view.