lightyagami

lightyagami

Member Since 2 Years Ago

Experience Points
1,030
Total
Experience

3,970 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
0
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 1
1,030 XP
Oct
14
2 months ago
Activity icon

Replied to Public URL Laravel

any route with /public at the end of url is wrong. see the @siangboon comment

Activity icon

Replied to Laravel Mail: I Send Email As Html (blade View) But In My Mail Client Receive It As A Attachment

@sinnbeck sorry for the late response.

this is my code in my ContactController.php:

/**
   * Email the contact request
   *
   * @param Request $request
   * @return Redirect
   */
    public function sendContact(ContactRequest $request)
    {
        $this->service->send('emails.message', $request->all());

        return redirect('contato')->with('success', 'Message sent with success');
    }

and this is my ContactService.php

<?php

namespace App\Services;

use Mail;

class ContactService
{

    public function __construct(Mail $mail)
    {
        $this->mail = $mail;
    }

    /**
     * Sends a email message
     *
     * @return void
     */
    public function send(string $view, $data)
    {
        $this->mail::send($view, $data, function ($message) {
            $message->from(config('mail.from.address'), config('mail.from.name'));

            $message->to(config('mail.from.address'))->subject('contact from site');
        });
    }
}

and finally, my view in views/emails/message.blade.php just plain html with the echo of form fields

Oct
11
2 months ago
Activity icon

Replied to Multiple User Authentication System

you're wasting your time, you have to use roles and permissions.

roles: admin, brands, users permissions: administrator, brand, user, guest.

you don't need separate your authentication in 3 types. that would be very dirt.

Activity icon

Replied to Session Flash Not Working

protected function registered(Request $request, $user)
{
     $request->session()->flash('points','You have 5 points !');
}
Activity icon

Replied to Session Flash Not Working

$request->session()->flash('status', 'Task was successful!');
Activity icon

Started a new Conversation Laravel Mail: I Send Email As Html (blade View) But In My Mail Client Receive It As A Attachment

i'm using laravel mail to send email from my contact form, but for any reason, in the email client it comes as a html file attached. what's happening?

Sep
17
2 months ago
Activity icon

Replied to NPM Commands Vs. Ubuntu Commands

you have windows, and, you're running a Ubuntu distro inside a Virtual Machine? if the answer is Yes: normally i don't do nothing in my windows, you can install php, node.js and your whole stack inside your ubuntu, is much better to work from ubuntu, because you have terminal with apt-get commands to easily install all packages you need, since npm until composer (php)

Activity icon

Replied to Array To String Conversion Feature Test

this slice is a array ['HTTP_REFERER' => route('settings.preferences')] he's trying convert the whole array to string, not sure what your test does

Activity icon

Replied to Undefined Index

better of this way!

<form action="{{ route('contact-submit') }}" method="post">
    @csrf
    <label for="full_name">Full Name</label>
    <input type="text" id="full_name" name="name" placeholder="Your Fullname..">

    <label for="email">Email</label>
    <input type="email" id="email" name="email" placeholder="Your Email..">

    <label for="subject">Subject</label>
    <input type="text" id="subject" name="subject" placeholder="Your Subject..">

    <label for="message">Message</label>
    <textarea id="message" name="body" placeholder="Write something.." style="height:200px"></textarea>

    <button type="submit">Send</button>
</form>

also, why you need check if the request method is POST?

Activity icon

Replied to Undefined Index

would be good you add a Validation to this form.

Sep
13
3 months ago
Activity icon

Replied to Unique Slug Duplicate Entry

the slug is unique but you would make a post id to it, so, everytime someone make a new post, only the id is different, also, i think is very easy someone make a slug equal to other post

Sep
12
3 months ago
Activity icon

Replied to Pagination Links() Method Doesn't Exist

write your loop of this way

@foreach($ads as $ad)
@endforeach

also, in your code you have a $ads->links(); outside of the loop. show us the output of $ads

with: {{ dd($ads) }}

Activity icon

Replied to Pass Data To Another Database If A Checkbox Is Checked

no, the property $connection can't be named $connection2. it must be only $connection

Activity icon

Replied to JQuery And Laravel-mix - Why You No Work??? (ノಠ益ಠ)ノ彡┻━┻

don't stay upset, those problems are more common that you think, even to pro devs

Activity icon

Replied to JQuery And Laravel-mix - Why You No Work??? (ノಠ益ಠ)ノ彡┻━┻

this is really a common issue when using Laravel mix, i'm not sure why this happens, actually i'm in a project where we have submodules of laravel, each with your own laravel mix, and that issue is very common. so to all folks here, when using jQuery you have several ways to solve it:

export your vendors

you can export your vendors from node_modules using the copy or copyDirectory option of Laravel mix.

make any plugin global

in your app.js you can define any imported plugin as global. after install that plugin try this:

global.pluginName = require('pluginName');

jQuery as the king of all sh*t

is a common issue, jquery not be loaded, so you can solve it like:

webpack.mix.js

mix.autoload({
    jquery: ['$', 'window.$', 'window.jQuery']
});

app.js

global.$ = global.jQuery = require('jquery');
Activity icon

Replied to Complex Eloquent / SQL Request, Need Backup

how about:

Book::with('pages')->get();

of this way your get the relationship with pages.

Activity icon

Replied to Pass Data To Another Database If A Checkbox Is Checked

your models are in different databases right? this is not a problem. in your model just set this property:

$connection = 'MyDatabaseConnectionName';

then it will store your data.

ps: you must set it in each model.

Activity icon

Started a new Conversation Loop Through A Array And Add Values Of First Row Of Each Array To Table Cells

i'm building a table where the first cell of each row is a "header" , a vertical table, like this one: https://jsfiddle.net/s1uy30v7/

i have a array like:

$collection = collect([
'months' => [
    'june' =>  [1222, 232323, 23423],
    'july' => [32323, 32313, 32333],
],
'total' => [323332, 3233, 43242] 
]);

how i can loop it and render in the right way in my table