phpmaven

phpmaven

Member Since 1 Year Ago

Experience Points
17,230
Total
Experience

2,770 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
159
Lessons
Completed
Best Reply Awards
1
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.

Level 4
17,230 XP
Aug
28
2 months ago
Activity icon

Started a new Conversation Including A Blade Partial With Content From A DB

I'm using the following to display some content from a DB in my Blade template:

{!! $customerService->CustomerServiceContents !!}

In that content I have the following:

@include('partials.shippingChart')

Instead of including that partial template, it just displays the text "@include('partials.shippingChart')"

How do I get it to actually render the partial template?

Thanks,

Mark

Jul
29
3 months ago
Activity icon

Replied to Error After Image Move.

I was trying to get the path of the file after it was deleted by the move operation which was causing the error. Purely operator error.

Activity icon

Replied to Error After Image Move.

I'm sorry, you are right. It was the next thing I was trying to do that was throwing the error. I just assumed it was part of the same process. Thanks

Activity icon

Replied to Error After Image Move.

Actually, I'm setting the path on the first line of code. I tried your version, and it does the same thing. As I said, it's moves the file into the directory and then throws the error after it's done.

Thanks

Activity icon

Started a new Conversation Error After Image Move.

I'm using the following code"

 $destinationPath = 'main_images';
 $file->move($destinationPath,$file->getClientOriginalName());

The file is moved into the directory, but then it bombs at line 52 of FileinfoMimeTypeGuesser.php with the error: "The "C:\xampp\tmp\phpA2FB.tmp" file does not exist or is not readable."

Thanks,

Mark

Jul
11
4 months ago
Activity icon

Replied to Add Rows To Database Collection

Yes, thank you. That's exactly what I want.

Activity icon

Replied to Add Rows To Database Collection

That works great! Thank you so much!

Activity icon

Replied to Add Rows To Database Collection

I just want to add items (rows) to the collection. So if I get 8 rows in the collection, I want be able to manually add more rows.

Activity icon

Started a new Conversation Add Rows To Database Collection

I'm creating a collection using the following code:

                    $attributes = DB::table('product_attribs')
                    ->where('Attrib_SKU', '=', $request->query('SKU'))
                    ->orderBy('Attrib_Seq', 'asc')
                    ->get();

I'm trying to figure out how to add additional rows to the collection.

I tried doing this, but it ends up adding arrays to the collection:

                    $attributes->push([
                    'Attrib_SKU'=>  'ichhar', 
                    'Attrib_Seq'=>  'uploads/pub.jpg',
                    'Attrib_Standard'=> '',
                    'Attrib_Name'=> '',
                    'Attrib_Type'=> '',
                    'Attrib_Size'=> '',
                    'Attrib_Initial_Value'=> '',
                    'Attrib_Supress'=> '',
                    'Attrib_Label'=> '',
                    'Attrib_Required'=> '',
                    'Attrib_Value'=> '',
                    'Attrib_Valid_Type'=> '',
                    'Attrib_Valid_Msg'=> '',
                    'Attrib_Dependency'=> '',
                    'OridinalLabel'=> '' ]);

In C# for example I would create a new object based on the product_attribs model and add that to the collection. Is there a way to do something similar in Laravel?

Thanks

Jun
10
5 months ago
Activity icon

Replied to Iterating Collection

Thank you for you replies. What is interesting is that it does actually save the values to the collection with the syntax I had and you can read them, you just can't iterate it. In my case the syntax that works is:

$testCollection= collect();

$testCollection->push('TestValue1', 'test1');
$testCollection->push('TestValue2', 'test2');
$testCollection->push('TestValue3', 'test3');
$testCollection->push('TestValue4', 'test4');

foreach ($testCollection $key => $value) {
    echo $key;
}

Thanks for pointing me in the right direction.

Activity icon

Started a new Conversation Iterating Collection

I'm using a collection to save form input values, like this:

$testCollection= collect();

$testCollection->TestValue1 = "test1"
$testCollection->TestValue2 = "test2"
$testCollection->TestValue3 = "test3"
$testCollection->TestValue4 = "test4"

I'm trying to figure out how to iterate the collection to see all of the properties and their values. I've tried using a foreach loop and that doesn't work. It just treats it like it's an empty collection.

Thanks