Tipoff

Tipoff

Member Since 2 Years Ago

Orlando, FL

at Tipoff, Inc.

Experience Points 26,000
Experience Level 6

4,000 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 256
Lessons
Completed
Best Reply Awards 0
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.

28 May
1 year ago

Tipoff left a reply on Issue With Multiple Route Parameters

Thanks, Snapey. That worked. Here's what I used in my QuotesController.php file:


    /**
     * Display the specified resource.
     *
    * @param  $authorId
     * @param  \App\Quote  $quote
     * @return \Illuminate\Http\Response
     */
    public function show($quoteauthor, Quote $quote)
    {
        if ($quoteauthor !== $quote->author->slug) {
            return redirect()->to($quote->path());
        }

        return view('quotes.quotations.show', compact('quote'));
    }

Tipoff started a new conversation Issue With Multiple Route Parameters

I am working on a route that looks like:


Route::get('quotes/{quoteauthor}/{quote}', '[email protected]');

It works, but it has an issue: When I visit any quote id, it will make the page appear behind an incorrect quote author. I notice the same issue here with the discussions on Laracasts:

Both of those show the same page, but one is an incorrect URL putting this discussion behind a channel where it does not exist. Is there a way to limit the second parameter to only show those items that have a relationship with the first model? How would I redirect the URL to the correct parameter on the first model?

Tipoff left a reply on Best Practice For HTTP Redirect

@martinbean, I'm making a change to my route structure:

Route::get('quotes/{quoteauthor}/{quote}', '[email protected]')->name('quote.show');

What changes do I need to make to the redirect route to have it pull the correct author for the quote and redirect it the appropriate URL?

26 May
1 year ago

Tipoff left a reply on Best Practice For HTTP Redirect

That's beautiful, @martinbean. It worked like a charm.

Tipoff started a new conversation Best Practice For HTTP Redirect

I'm reading the documentation on redirects (https://laravel.com/docs/5.4/redirects), but having some trouble setting one up the way I want. I have a quotes database table with an id column that begins incrementing at 1,000,000 so there will always be 7 digit id numbers for them. I want people to visit mywebsite.com/1000000 and be redirected to mywebsite.com/quotes/quotations/1000000 and have tried the following to avail:

''' Route::get('quotes/quotations/{quote}', '[email protected]');

Route::get('{quote}', function () { return redirect()->action( '[email protected]', ['id' => {quote}] ); '''

I have also tried things like:

''' Route::get('quotes/quotations/{quote}', '[email protected]');

Route::get('{quote}', function () { return redirect('quotes/quotations/{quote}', '[email protected]'); }); '''

My main route works, but both attempts at the redirect are failing. I think it is not passing along the prior {quote} id value, but I can't find an example with this to fix it. Any help and advice on the best practice for implementing this would be appreciated. Thanks

24 May
1 year ago

Tipoff left a reply on Custom Key Name With Field From Different Table

Thank you both for the insight. I agree that it would be better to use book_authors as a pivot table between authors and books and also another table for contributions. That table would essentially key if the author was a solo author for the book, a co-author, editor, contributor, etc.

The authors table however will have more than just authors who wrote books. It will also include authors of articles and other content. I have an App/Author model that displays them in another section, but I would like to display just the Authors who have written books in this books section of the website with a different view. It seems the best way to accomplish this would be to have this model also use the authors table and just restrict the authors using a where clause for those included in the pivot table. I think Jeffrey has some videos explaining the best way to do this.

Tipoff left a reply on Custom Key Name With Field From Different Table

Thank you, Tekmi. I thought that might be the case since I couldn't find anything on this. If I used the authors table and used a where clause to limit it to only authors that had a matching id in the book_authors table, what would be the best way to approach that?

Tipoff started a new conversation Custom Key Name With Field From Different Table

I have two database tables that I want to use in my model with the main one being a subset of authors, those with published books. The model should only include authors that are in this table but I want to use a custom Key Name for the model of the slug that is associated with the author in the larger authors table. I can't find anything on how to accomplish this and would appreciate your help. Here's what I have so far in App/BookAuthor:

class BookAuthor extends Model { public $table = "book_authors"; public $table = "authors";

/**
 * Get the route key for the model.
 *
 * @return string
 */
public function getRouteKeyName()
{
    return 'slug'; //This field is only in the authors table
}

15 May
1 year ago

Tipoff started a new conversation Laracasts User Profile URL Structure (/@Username)

What's the best practice for setting up user profiles with a URL structure of /@Username like that used here on Laracasts or on Medium? In Laravel, what would I insert in the route file?

On a side note, what are the SEO implications of using the @ sign in a URL? Are there any negative consequences for search engine readability?