RaduCruceana

RaduCruceana

Member Since 2 Years Ago

Bucharest

Experience Points 6,840
Experience Level 2

3,160 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 66
Lessons
Completed
Best Reply Awards 0
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.

31 Jul
1 month ago

RaduCruceana left a reply on How To Specify The Database Name In Jajra/ Datatables

@cronix

Yes, because Yajra/Datatables facade does not have connection() or at least I don't know how to use it.

If I try:

return  Datatables::connection('sqlJato')->of(DB::table('coeficientVR_VanzariNoi')
...

I get an Datatables error.

RaduCruceana left a reply on How To Specify The Database Name In Jajra/ Datatables

@Cronix

Thank you sir, i already did that.

When i use query builder I already use it like that:

$auto = DB::connection('sqlJato')->table('version as v')-> 

...

My question is specific to Yajra\DataTables facade.

How do I specify the connection in

return  Datatables::of(DB::table('oferte as o')
...

RaduCruceana started a new conversation How To Specify The Database Name In Jajra/ Datatables

I'm using Laravel 5 with Jajra/Datatables

The project use 3 databases, one is MySQL and 2 are commercial SQL databases.

The SQL databases have the tables with exactly same names.

If I want to display a table from MySql database I use in controller:

return  Datatables::of(DB::table('coeficientVR_VanzariNoi')
        ->get(['id','marca','model','capacitate','combustibil', 'caroserie', 'altaClasaSchimb', 'coeficient',
              ]))->make(true);

and it's working great!

How to specify a table from one of the the SQL databases?

I have models associated to them, and models have the connection specified.

Example for one of table which is named "version":

class version_Jato extends Model
{
    //
    protected $connection = 'sqlJato';
    protected $table = 'version';
    protected $primaryKey = 'vehicle_id';

....

So I need to specify the SQL database but I don't know how.

Thank you for your time!

29 Dec
8 months ago

RaduCruceana left a reply on Two Database Connections Defined But Not Working

If you just put dd($posts); after $posts = Post::all(); what you get?

RaduCruceana left a reply on Two Database Connections Defined But Not Working

As @shez1983 already said, From the controller you send $posts to the view, and in view (in the @foreach loop) you try to access $post is an "s" missing. I always reset views cache with:

php artisan view:clear

without problems.

22 Dec
8 months ago

RaduCruceana left a reply on Sweetalert SWAL Is Not Defined - After NPM Install

I had the same problem, it worked after I put into bootstrap.js:

 window.swal = require('sweetalert2'); 

AND

npm run prod

OR

npm run dev

and Sweetlaert2 was found.

18 Nov
1 year ago

RaduCruceana left a reply on LeftJoin In Eloquent?

Thank you @Snapey !

Your answer solved my primary question!

So, If I really need a left join I will use QB, because such relationship is not implemented by Eloquent?

Sorry to bother you, but I just want to clarify things in my mind .

I'm and old fashioned SQL dinosaurus :)

RaduCruceana left a reply on LeftJoin In Eloquent?

This mean that I can use Modell::AnyQuerryBuliderMethod ?

RaduCruceana left a reply on LeftJoin In Eloquent?

Thank you @jlrdw ! Do you have a little time for a little more light? :)

Best regards from Bucharest!

RaduCruceana started a new conversation LeftJoin In Eloquent?

Hello dear friends,

I'm beginner in Laravel, I'm using 5.5 version.

Is there a method leftJoin in Eloquent ORM? I know there is one on DB facade, but if I want to use Eloquent only is there a leftJoin method?

Let's suppose, as an simple example, I have a model CarBrand and another one CarModel. CarBrand have a relationship type hasMany with CarModel, and CarModel belongsTo CarBrand.

Suppose I want to find CarBrand's id's without CarModel corespondence. I found on stackOverflow, several responses like this:

 CarBrand::leftJoin('CarModelTableName', function($join) {
      $join->on('CarBrandTableName.id', '=', 'CarModelTableName.carBrandId');
    }) ->whereNull('CarModelTableName.carBrandId')->first();
     

I have checked and it does function as a left join :)

But in this case is ::leftJoin an Eloquent method or silently it goes to DB facade? I can't find any for leftJoin in Laravel 5 official docs other than DB facade. Any links would be appreciated.

Hope I was clear, Thank you for your attention.

27 May
2 years ago

RaduCruceana left a reply on Where Are You All From?

Bucharest Romania :)

RaduCruceana started a new conversation MS SQL Filestreaming Is Implemented In Laravel?

Hello, I'm less than beginner in Laravel, and this is my first message. I have a little project made in the past 2 months. I want to save some .pdf dynamically generated files (with domPDF) in a MSSQL Database with Filestream data enabled. Does Laravel offer a way to do this?

Thank you for your time, Radu