STEREOH

STEREOH

Member Since 3 Years Ago

Dijon

Software Engineer at Intitek.fr/APRR.fr

Experience Points 23,350
Experience Level 5

1,650 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 182
Lessons
Completed
Best Reply Awards 13
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.

19 Mar
1 day ago

STEREOH left a reply on Namespace Declaration Statement Has To Be The Very First Statement Or After Any Declare Call In The Script

1- You're missing a whitespace somewhere 2- Your file is encoded in UTF8 WITH BOM 3- The problem is not in this file

There's really nothing else.

STEREOH left a reply on Namespace Declaration Statement Has To Be The Very First Statement Or After Any Declare Call In The Script

Check that your IDE is encoding your file in UTF-8 without BOM.

STEREOH left a reply on Videos Are Not Playing In Google Chrome

Try and reboot your computer and your router.

18 Mar
2 days ago

STEREOH left a reply on How To Dynamically Change Layout

If it is just about the layout and with bulma it's very easy.

if you want what you described ( " Every 4 items we go to next line" ) just do

<div class="columns is-multiline is-mobile">

</div>

And inside it cycle through each testimonial and put their content inside

  <div class="column is-one-quarter">
    <code>is-one-quarter</code>
  </div>

full code :

<div class="columns is-multiline">
  @foreach($testimonials as $testimonial)
      <div class="column is-one-quarter">
        <code>{{ $testimonial->content }}</code>
      </div>
   @endForeach
</div>

https://bulma.io/documentation/columns/options/#multiline

For the backend , well if you need help on this you're in the right place you'll need to learn basic CRUD https://laracasts.com/series/laravel-from-scratch-2018

STEREOH left a reply on Route For Show Not Working

Hey, you're using Route Model Binding,

Since in your second case you use fixture , laravel nows it has to get a Fixture model because it is implied, in your first case it doesn't.

You should therefore explicitelly bind it.

Doc for explicit Route Model binding is here : https://laravel.com/docs/5.8/routing#route-model-binding

STEREOH left a reply on Can Anyone Suggest Remove Undefined Variable Error Without Issset Variable In Laravel??

What tykus said +

Man fix your code , there's a reason why it is called an error. This souldn't be in your code in the first place.

The solution tykus provided you with is even simpler than you initially had.

STEREOH left a reply on Merge Two Relationships And Return A Relationship.

public function getAllGroupsAttribute()
{
        $allGroups = $this->guestGroups->push($this->homeGroup);

        return $allGroups;
}

STEREOH left a reply on SQLSTATE[23000]: Integrity Constraint Violation

@BEHNAMPMDG3 - Well that depends the use case you need.

What do you want to do with this query ?

STEREOH left a reply on Request

Your method busqueda in ColegiadoController is also present in its parent Controller and is declared with diferent parameters.

in ColegiadoController you have

public function busqueda(Request $request)

and in Controller.php you have

public function busqueda()

These two methods should have the same parameters.

STEREOH left a reply on Error: Undefined Variable: Brcode

to use your $brcode inside your subquery you need to specify you're using it like this.

        $slc = Slclass::whereHas('child_sltype', function ($query) use ($brcode) {
            $query->where('SLTypeBR_CODE',$brcode);
        })->get();

STEREOH left a reply on SQLSTATE[23000]: Integrity Constraint Violation

You can't SELECT something that isn't in the Group Byclause, the message is clear.

Either you SELECT email only

Or you SELECT email , name and member_course.id

17 Mar
3 days ago

STEREOH left a reply on Registration Create Methode Undefined Index

@KISAW88 - If your input is disabled , it will not be sent in the post request so you won't have it in your array.

STEREOH left a reply on Registration Create Methode Undefined Index

I like @tykus solution more but both work :)

STEREOH left a reply on Registration Create Methode Undefined Index

The errors says it all.

It can't find a field named 'district' in your form.

your Select is named 'Type_compte'

You should have an other field named 'District'

15 Mar
5 days ago

STEREOH left a reply on Faker To Generate 2-3 Letters Word

From Faker Docs :

strtoupper($faker->lexify('???'));

https://github.com/fzaninotto/Faker

STEREOH left a reply on Run A Method Or Command When A Row Is Expired.

You can check for it at your instanciation but that's potentially far more than 1 command/query per minute.

STEREOH left a reply on Run A Method Or Command When A Row Is Expired.

Hey !

Couldn't you just query all publications with a date superior of the current date ?

STEREOH left a reply on What Is The Reason For Using Index() In Migration?

@TYKUS - Thanks tykus, definitely going to check this one.

STEREOH left a reply on InvalidStateException In AbstractProvider.php Line 209

Could you please pull your fingers out of your arse and use them to put a little effort in explaining your problem ?

Anyway, check this if you're using socialite (can't be sure cause of your awful post): https://stackoverflow.com/questions/30660847/laravel-socialite-invalidstateexception

14 Mar
6 days ago

STEREOH left a reply on What Is The Difference This Form Action Link ?

if your app is at the route of your domain (http://your-domain.test) you can use

<form action="/tasks/{{$task->id}}" method="post">

if not (http://yourdomain.test/yourapp/) use the helper to get the full path.

13 Mar
1 week ago

STEREOH left a reply on Please Help Newbie Question, Inline Templates

thanks @tykus , What do you think would be the best approach to keep the button and it's behavior ?

STEREOH left a reply on Please Help Newbie Question, Inline Templates

I'm also learning it so I hope my explanation for this is 1- true and 2-clear.

Since you have no "template" in your inline component , any attribute inside this component will be Scoped to the component.

However in a regular component Vue is trying to find otherRate in your root Vue and it is not here.

My guess is any logic should be inside your component and slots are just for filling dynamic text purposes.

You could also comunicate between your Root element and your component using events.

STEREOH left a reply on Install Lumen Inside Folder Of Laravel Application

Or just use an alias if you really wan this kind of url

STEREOH left a reply on How To Edit Data In Database Using Javascript ?

Ajax.

See I'm making as much effort replying to you as you are searching and creating threads with 1 line questions :)

STEREOH left a reply on Lost Submitted Data After Validation

Well if the data is sent to the controller but not reflected in your views that's because you're not persisting it.

Can you show me one of your form with it's view and controller code please.

STEREOH left a reply on How To Print Current System Time In My Laravel Blade

{{ \Carbon\Carbon::now()->toDateString() }} 

STEREOH left a reply on Laravel Logging - Change Mode Daily To Monthly

{{ \Carbon\Carbon::now()->toDateString() }} 

STEREOH left a reply on Ajax Not Posting Data. What Am I Doing Wrong?

@BEHNAMPMDG3 - 419 is the error code for missing CSRF field, in your javascript you search for the tag with the name "_token" but you created it with the name "csrf-token".

STEREOH left a reply on Ajax Not Posting Data. What Am I Doing Wrong?

@RONON - He is not closing the click before the ajax, it's just bad indentation.

12 Mar
1 week ago

STEREOH left a reply on 403 Forbidden After Publishing

On windows you would right click your folder -> properties -> security tab -> and Add Read access from the user you want.

Don't forget to check "give this access to each file/folder inside"

STEREOH left a reply on 403 Forbidden After Publishing

You /storage/ folder and its content should have acces in read.

STEREOH left a reply on Bootstrap 4 Scss With Autoprefixer Missing -ms-flex-wrap

from https://github.com/postcss/autoprefixer

Available options are: ...

  • flexbox (boolean|string): should Autoprefixer add prefixes for flexbox properties. With "no-2009" value Autoprefixer will add prefixes only for final and IE 10 versions of specification. Default is true. ...

Maybe it can help

STEREOH left a reply on How Can I Load The Value From The Database Into Input On Update?

In your controller you forgot to call get() or first() at the end for your query.

$course = \DB::table('courses')->where('user_id', '=', \Auth::id())->where('id', '=', $course->id);

should be

$course = \DB::table('courses')->where('user_id', '=', \Auth::id())->where('id', '=', $course->id)->first();

even easier, laravel instanciated the $course for you, you don't need to query it.

public function edit(Course $course)
    {
        return view('courses.edit', ['course' => $course]);
    }

see how easy it is.

STEREOH left a reply on How To Fetch All Unread Notification In One Query

oh god.

If you are using notifiable you can just



foreach (auth()->user()->unreadNotifications as $notification) {
    $notification->markAsRead();
}

https://laravel.com/docs/5.8/notifications#database-notifications

STEREOH left a reply on How To Use A Custom Form Validator In Laravel ?

you can , on top of each field put

@if($errors->has('field_name') {{ $errors->get('field_name') }} @endif

https://laravel.com/docs/5.8/validation#quick-displaying-the-validation-errors

STEREOH left a reply on How To Use A Custom Form Validator In Laravel ?

You can just show the first error instead of iterrating through all errors.

{{ $errors->first() }}

STEREOH left a reply on Set Faker's Seed Globally For Laravel's Factories

If I understand well you want to use faker to set the same value everytime with your factory ?

Why would you use faker then ?

Just write your value in your factory.

STEREOH left a reply on Why My Update & Insert Form Return Url+token Instead Of Insert/update Data

POST is a method , not an action.

<form action="POST" action="{{route('urusan.update',$urusan->kode_urusan)}}">
<form method="POST" action="{{route('urusan.update',$urusan->kode_urusan)}}">

STEREOH left a reply on Why My Update & Insert Form Return Url+token Instead Of Insert/update Data

The problem is in your view but can't read it , could you please copy it correctly in a code block?

STEREOH left a reply on Add Captcha Dynamically On Login Failure

You could show the captcha @if(!is_empty($errors))

but that's going to fire after first failed attempt.

You could count fails in a session variable too so you can show it after X attempts.

STEREOH left a reply on FatalErrorException

either do

@if(isset($button->firstpay))

or

@if($button->firstpay == "null"))

not one in the other.

STEREOH left a reply on Too Few Arguments To Function 0 Passed And Exactly 1 Expected

@MIGDALIUS - I would recomend you to check https://laracasts.com/series/laravel-from-scratch-2018/episodes/3

and the rest of the series as you need it to understand how laravel is working.