fatenfalfoul

fatenfalfoul

Member Since 4 Years Ago

Experience Points
3,160
Total
Experience

1,840 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
3
Lessons
Completed
Best Reply Awards
1
Best Reply
Awards
  • start your 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-in-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 Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist 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
3,160 XP
Jul
23
2 months ago
Activity icon

Replied to How To Combine Laravel Left Join And Group By For Another Table

//get users that have status $users1 = DB::table('users')->leftjoin('result', 'users.id', '=', 'result.user_id')->where('users.active', '=', '1')->where('result.identity', '=', '1')->select('users., 'result.status')->orderBy(users.name', asc'); //get the rest of users and union the rest ;) $users2 = DB::table('users')->whereNOT('id', 'status.user_id')->select('users.', , DB::raw('0 as status')])->union($users1)->get();

on the view blade just add if else to replace status with desired name for example if 0 ==> unavailable ;) Good luck :D

Activity icon

Replied to Avoid Relative Path Import Hell In React-native?

Just use the larvel links ;) storage_path(\your_director...) or public_path(...) On the view just use blade links ;) {{ ('/...') }} Good luck

Activity icon

Replied to How To Call Stored Procedure Using Laravel And Send Mail?

I think on the controller method you call your procedure using your login id as request post it to the view then add a button or what you like to send mail ;) Good luck

Activity icon

Replied to Laravel Eloquent Query To Display Data In Datatable For Each ID In Respective Row

I think you must do an union query that will get data for each customer and display that as named columns. And of course that named columns can be null So change your php query builder code. On the jS you will diplay all the named columns ;) such as : {data: '0001', name: '0001'}, {data: '0002', name: '0002'}, {data: '0003', name: '0003'},

Activity icon

Replied to Can I Add Pdf Generated From Dompdf Without Save To A Public Folder?

I have the same problem and I'm thinking to generate my pdf report on an IFRAME html tag such as :

<iframe src=”/pdf/sample-3pp.pdf#page=2" width=”100%” height=”100%”>
Jul
22
2 months ago
Activity icon

Started a new Conversation Custom Laravel Rules Deos Not Work With Proengsoft / Laravel-jsvalidation

Hello I'm using laravel 5.1 for our company's server requirements. I installed the"proengsoft/laravel-jsvalidation": "^1.5.0", to validate on client side my form data I'm developping a multi array form. I must validate that twice hour data are greater than other twice hour and data so let's take for example that rule:

$rules[ 'horaire.'.$i.'.heure_arrivee_lieu'] = 'checkDates:horaire'.$i.'date_arrivee_lieu, horaire'.$i.'date_depart, horaire'.$i.'heure_depart';

My custom rule on the appserviceProvider.php is:

Validator::extend('checkDates', function($attribute, $value, $parameters, $validator)
          {
            $d1 = date('Y-m-d ', strtotime($parameters[0])); 
            $h1 = date('H:i:s', strtotime($value)); 
            $d1 = date('Y-m-d H:i:s', strtotime("$d1 $h1"));

            $d2 = date('Y-m-d ', strtotime($parameters[1])); 
            $h2 = date('H:i:s', strtotime($parameters[2])); 
            $d2 = date('Y-m-d H:i:s', strtotime("$d2 $h2"));
            
              if(  $d1 <= $d2 ) 
              {
                  $validator->addReplacer('checkDates',  function ($message, $attribute, $rule, $parameters) use ($value, $validator) {
                    //return str_replace('_', ' ' , 'Le '.$attribute. ' doit être supèrieure à '.$parameters[1] );
                    
                    $other = $validator->getCustomAttributes($attribute);
                    $fields = [];
                    foreach ($other  as $parameter) {
                        $fields[] = ($parameter);
                    }
                    $i = array_search($other[$attribute], $fields); 
                    //echo '<pre>'; print_r($other[$attribute]); print_r($fields[$i-1]); exit();
                    if($i >= 1){
                        return str_replace(':attribute', $other[$attribute], (':attribute doit être supèrieur à '.$fields[$i-1]));
                    }
                    else {
                        return str_replace(':attribute', $other[$attribute], (':attribute doit être supèrieur aux horaires antécèdants'));
                    }
                    
                     
                    });  
                  return false;
              }
              return true;
          });

All is okay on the submit add form but all the custom rules deos not work on the update form what's the problem ? Thanks for help