beeInteractive

beeInteractive

Member Since 5 Years Ago

Experience Points 83,910
Experience Level 17

1,090 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 819
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.

16 Jun
1 month ago

beeInteractive left a reply on Create A Unique Username Based On First Letter Of First Name And Entire Last Name In Laravel

Hi!

Thank you so much, it's working exactly as expected! The final code is the same as the one you provided. Nothing needed to change.

Thanks!

beeInteractive started a new conversation Create A Unique Username Based On First Letter Of First Name And Entire Last Name In Laravel

I have a database with users. One column for the first name, one for the last name. I need to generate the usernames based on the first name and the last name and need to follow this pattern:

first letter of first name only entire last name if the combination is not unique, then add a number at the end of the last name, increment on each new identical occurence.

How can I achieve this with eloquent and Laravel?

Thanks in advance!

18 Dec
7 months ago

beeInteractive left a reply on Unlocking Badges Workshop Help Needed

I have a paid membership on the site and I watched the full serie..

17 Dec
7 months ago

beeInteractive left a reply on Unlocking Badges Workshop Help Needed

@BOBBYBOUWMANN - Yes i'v seen other videos but I cannot make it work since I don't have this part of the code. Can you tell me what type of relationship it could be? I've tried some but I always get this kind of error:

Call to undefined method Illuminate\Database\Eloquent\Relations\HasOne::awardExperience()
Call to undefined method Illuminate\Database\Eloquent\Relations\BelongsTo::awardExperience()

beeInteractive started a new conversation Unlocking Badges Workshop Help Needed

Hi!

I'm actually following the "unlocking badges workshop" and I have some difficulties to make one of the first test pass.

Here's the issue:

$user->getExperience()->awardExperience(1001);

I cannot make it work because I don't know what's inside the getExperience methods. What's the logic behind this? Can someone help me with this?

Thank you so much in advance for your time!

27 Sep
9 months ago

beeInteractive left a reply on Laravel Valet Not Working On Mac OS Mojave

Hi! I had the same problem and I just re-installed completely Laravel Valet and restarded my mac. It worked fine.

Also, this issue helped me: https://github.com/laravel/valet/issues/642

08 Aug
11 months ago

beeInteractive left a reply on Laravel 5.4 Multilingual Application

Hi!

For multilingual sites I use these packages. (since version 5.4):

dimsav/laravel-translatable arcanedev/localization waavi/translation

With this you can manage multiple translations in your models, translated routes. Maybe it's a easier way to achieve what you want.

Example of my web.php :

Route::localizedGroup(function () {
    Route::transGet('routes.home', ['as' => 'home', 'uses' => [email protected]']);
});

In my lang folder, I have a routes.php file with an array of all translated routes:

Example: /resources/lang/fr/routes.php

<?php

return [
        'home'  => '',
    'contact' => 'contactez-moi'
];
    

Then, I have, in my views, the links for the named routes:

<p>{{ localized_route('routes.contact') }}">Contact</a>

Hope this gives you some directions.

22 Jan
1 year ago

beeInteractive left a reply on Eloquent Select All Entries Created At The Full Time

@m-rk Your solution is working like a charm! Here's my final query:

$results = Model::whereRaw('MINUTE(created_at) = 0')->get();

Thank you so much!

beeInteractive left a reply on Eloquent Select All Entries Created At The Full Time

Hi!

Actually not working for my case. I need all time records and not only for the last hour.. Like for example:

Select * from entries WHERE hour = midday

Something like that.

19 Jan
1 year ago

beeInteractive started a new conversation Eloquent Select All Entries Created At The Full Time

Hi!

I'm actually inserting each 15minutes some datas in my database. Then, I build a graph to show the evolution of the datas. But each entries becomes a little too much for showing on the graph.

I'm trying now to select only the entries that have been created at full hour, for example, every rows created at 8, 9, 10.. for the full clock. How can I achieve this?

Thanks in advance for your time!

19 Jul
3 years ago

beeInteractive left a reply on Multiple Inner Joins In The Same Table

Hi @willvincent ! Yes, "menuTitre" is right, some of the code is in french :-)

It doesn't work with my code, it says that column l.origin is not found:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'l.origin' in 'field list'

beeInteractive left a reply on Multiple Inner Joins In The Same Table

@thefuzzy0ne I always get this response if I don't use the raw function:

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near
'.`value, p`.`value, u`.`value` from `datas` as `l` inner join `datas` as `t` on ' at line 1 (SQL: select `l`.`origin, t`.`value, l`.`value, p`.`value, u`.`value` from `datas` as `l` inner join `datas` as `t` on `l`.`origin` = `t`.`origin` inner join `datas` as `p` on `p`.`origin` = `l`.`origin` inner join `datas` as `u` on `u`.`origin` = `l`.`origin` where `l`.`type` = menuLevel and `l`.`value` = 0 and `t`.`type` = menuTitre and `p`.`type` = menuParent and `u`.`type` = menuUrl)

Some of the value doesn't seem to be escaped and that cause the error. That's why I used the raw functions..

beeInteractive left a reply on Multiple Inner Joins In The Same Table

@thefuzzy0ne I found a solution! I used the aliases but not at the same place as you suggest. Here's a working code:

return DB::table(DB::raw('datas l'))
    ->select(DB::raw('l.origin AS origin, t.value AS titre, l.value AS level, p.value AS parent, u.value AS url'))
    ->where(DB::raw('l.type'), DB::raw('\'menuLevel\''))
    ->where(DB::raw('l.value'), DB::raw(0))
    ->where(DB::raw('l.site_id'), DB::raw($this->id))
    
    ->join(DB::raw('datas t'), DB::raw('l.origin'), '=', DB::raw('t.origin'))
    ->join(DB::raw('datas p'), DB::raw('p.origin'), '=', DB::raw('l.origin'))
    ->join(DB::raw('datas u'), DB::raw('u.origin'), '=', DB::raw('l.origin'))
    
    ->where(DB::raw('t.type'), DB::raw('\'menuTitre\''))
    ->where(DB::raw('p.type'), DB::raw('\'menuParent\''))
    ->where(DB::raw('u.type'), DB::raw('\'menuUrl\''))
->get();

It's probably not the nicest way to perform the query, but for now this is working. I just hope it doesn't need to much memory. Thanks for you help!

beeInteractive left a reply on Multiple Inner Joins In The Same Table

@thefuzzy0ne Hi! Thank for you reply. I tried with the ->toSql method and pasted it directly in SequelPro and replaced the values but always the same syntax error. Here's the query:

"select `l`.`origin, t`.`value, l`.`value, p`.`value, u`.`value` from `datas l` inner join `datas t` on `l`.`origin` = `t`.`origin` inner join `datas p` on `p`.`origin` = `l`.`origin` inner join `datas u` on `u`.`origin` = `l`.`origin` where `l`.`type` = ? and `l`.`value` = ? and `t`.`type` = ? and `p`.`type` = ? and `u`.`type` = ?"

I also tried with the missing operator in my where clause.

beeInteractive started a new conversation Multiple Inner Joins In The Same Table

Hi everyone!

I try to "translate" this query into a laravel eloquent query. The query works in mysql but when I try to write it in Laravel, it fails with the message that I have an sql syntax error.

Here's the working query:

SELECT l.origin, t.value, l.value, p.value, u.value FROM datas l
inner join datas t on l.origin = t.origin 
inner join datas p on p.origin = l.origin
inner join datas u on u.origin = l.origin
WHERE l.type = 'menuLevel'
and l.value = 0
and t.type='menuTitre'
and p.type='menuParent'
and u.type='menuUrl'

And here's my laravel try:

DB::table('datas l')->select('l.origin, t.value, l.value, p.value, u.value')
->join('datas t', 'l.origin', '=', 't.origin')
->join('datas p', 'p.origin', '=', 'l.origin')
->join('datas u', 'u.origin', '=', 'l.origin')
->where('l.type', 'menuLevel')
->where('l.value', 0)
->where('t.type', 'menuTitre')
->where('p.type', 'menuParent')
->where('u.type', 'menuUrl')->get();

Should I do this with the raw queries? Thanks for your time!

11 May
3 years ago

beeInteractive left a reply on Composer Conflict When Installing Valet

Hi @kastony , try to run composer global update. It worked for me