<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: ilya</title>
    <description>The latest articles on DEV Community by ilya (@bluewater0506).</description>
    <link>https://dev.to/bluewater0506</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F591640%2F3e56f6a4-5b25-4825-9031-3b700e30c8ab.jpg</url>
      <title>DEV Community: ilya</title>
      <link>https://dev.to/bluewater0506</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bluewater0506"/>
    <language>en</language>
    <item>
      <title>Is it possible to call one function continuously in while loop?</title>
      <dc:creator>ilya</dc:creator>
      <pubDate>Mon, 24 Jul 2023 18:26:50 +0000</pubDate>
      <link>https://dev.to/bluewater0506/is-it-possible-to-call-one-function-continuously-in-while-loop-4nb4</link>
      <guid>https://dev.to/bluewater0506/is-it-possible-to-call-one-function-continuously-in-while-loop-4nb4</guid>
      <description>&lt;p&gt;I am wondering whether it is possible or not to realize multi threads in javascript while loop.&lt;br&gt;
for example,&lt;br&gt;
`while(1){&lt;br&gt;
    sample(param1, param2)&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;function sample(param1, param2){&lt;br&gt;
    // some code here&lt;br&gt;
    console.log("some result")&lt;br&gt;
}&lt;br&gt;
`&lt;br&gt;
I tried with it but it does not show console.log result.&lt;br&gt;
I think it happens because while() call function again before the sample() function execute some code and so sample() function start from scratch again.&lt;br&gt;
How can I realize multi thread in javascript?&lt;/p&gt;

</description>
    </item>
    <item>
      <title>how to convert sql query to laravel model style without DB?</title>
      <dc:creator>ilya</dc:creator>
      <pubDate>Mon, 22 Mar 2021 18:53:00 +0000</pubDate>
      <link>https://dev.to/bluewater0506/how-to-convert-sql-query-to-laravel-model-style-without-db-3g2g</link>
      <guid>https://dev.to/bluewater0506/how-to-convert-sql-query-to-laravel-model-style-without-db-3g2g</guid>
      <description>&lt;p&gt;-&amp;gt;join(array(\DB::expr('(select SUM(p.amount) as paid, p.case_id&lt;br&gt;
                            from payments p&lt;br&gt;
                            where p.status_id = 3&lt;br&gt;
                            group by p.case_id)'),'p'), 'LEFT')-&amp;gt;on('p.case_id','=','c.id')&lt;br&gt;
this is sql query of fuelphp&lt;br&gt;
i am going to convert it to laravel query style to not use DB.&lt;br&gt;
DB means illumiate\Fascade\DB;&lt;br&gt;
how?&lt;/p&gt;

</description>
    </item>
    <item>
      <title>laravel eloquent relation</title>
      <dc:creator>ilya</dc:creator>
      <pubDate>Sat, 20 Mar 2021 14:24:18 +0000</pubDate>
      <link>https://dev.to/bluewater0506/laravel-eloquent-relation-2hpi</link>
      <guid>https://dev.to/bluewater0506/laravel-eloquent-relation-2hpi</guid>
      <description>&lt;p&gt;This is table relation&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; $result = Event::select('events.*', 'events.at as datatime', 'events.end_time as endtime','event_types.name as event_type_name')
        -&amp;gt;from('events')
        -&amp;gt;leftJoin('event_types', 'event_types.id', 'events.type_id')
        -&amp;gt;where('events.id', $id)
        -&amp;gt;where('events.user_id', 350)
        -&amp;gt;get()
        -&amp;gt;toArray();
    return $result;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;i want to change it to eloquent relation.&lt;br&gt;
for example, i think we can use with() method instead of select method of query.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Rename column in laravel migration</title>
      <dc:creator>ilya</dc:creator>
      <pubDate>Wed, 17 Mar 2021 13:01:35 +0000</pubDate>
      <link>https://dev.to/bluewater0506/rename-column-in-laravel-migration-2lpk</link>
      <guid>https://dev.to/bluewater0506/rename-column-in-laravel-migration-2lpk</guid>
      <description>&lt;p&gt;php artisan make:migration rename_fields_to_chat_messages_table --table=chat_message&lt;br&gt;
You can created migration file with above command.&lt;br&gt;
You can rename column as follow.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public function up()
{
    Schema::table('chat_message', function (Blueprint $table) {
        $table-&amp;gt;renameColumn('created_date', 'created_at');
    });
}

/**
 * Reverse the migrations.
 *
 * @return void
 */
public function down()
{
    Schema::table('chat_message', function (Blueprint $table) {
        $table-&amp;gt;renameColumn('created_at', 'created_date');
    });
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;you can update as follow&lt;/p&gt;

&lt;p&gt;public function up()&lt;br&gt;
    {&lt;br&gt;
        Schema::table('chat_message', function (Blueprint $table) {&lt;br&gt;
            $table-&amp;gt;unsignedInteger('user_id')-&amp;gt;change();&lt;br&gt;
            $table-&amp;gt;unsignedInteger('doc_id')-&amp;gt;change();&lt;br&gt;
            $table-&amp;gt;unsignedInteger('created_by')-&amp;gt;nullable();&lt;br&gt;
            $table-&amp;gt;unsignedInteger('updated_by')-&amp;gt;nullable()-&amp;gt;after('created_by');&lt;br&gt;
            $table-&amp;gt;timestamp('created_at')-&amp;gt;nullable()-&amp;gt;change();&lt;br&gt;
            $table-&amp;gt;timestamp('updated_at')-&amp;gt;nullable()-&amp;gt;after('created_at');&lt;br&gt;
        });&lt;br&gt;
    }&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/**
 * Reverse the migrations.
 *
 * @return void
 */
public function down()
{
    Schema::table('chat_message', function (Blueprint $table) {
        $table-&amp;gt;dateTime('created_date')-&amp;gt;change();
        $table-&amp;gt;dropColumn('created_by');
        $table-&amp;gt;dropColumn('updated_by');
        $table-&amp;gt;dropColumn('updated_at');
    });
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
    </item>
    <item>
      <title>Hello, Please help me in laravel model</title>
      <dc:creator>ilya</dc:creator>
      <pubDate>Tue, 09 Mar 2021 20:20:06 +0000</pubDate>
      <link>https://dev.to/bluewater0506/hello-please-help-me-in-laravel-model-1bmi</link>
      <guid>https://dev.to/bluewater0506/hello-please-help-me-in-laravel-model-1bmi</guid>
      <description>&lt;p&gt;i am changing query to laravel model.&lt;br&gt;
but only one problem...&lt;br&gt;
-&amp;gt;join(array(\DB::expr('(select SUM(p.amount) as paid, p.case_id&lt;br&gt;
                        from payments p&lt;br&gt;
                        where p.status_id = 3&lt;br&gt;
                        group by p.case_id)'),'p'), 'LEFT')-&amp;gt;on('p.case_id','=','c.id')&lt;br&gt;
this is leftjoin subquery but i have to change to laravel model type.&lt;br&gt;
Please help me.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Hi, everyone!</title>
      <dc:creator>ilya</dc:creator>
      <pubDate>Sat, 06 Mar 2021 18:27:18 +0000</pubDate>
      <link>https://dev.to/bluewater0506/hi-everyone-543b</link>
      <guid>https://dev.to/bluewater0506/hi-everyone-543b</guid>
      <description>&lt;p&gt;I am a web developer. Want good relation with you.&lt;br&gt;
I have one problem.&lt;br&gt;
Db::last_query();&lt;br&gt;
this is grammar in fuelphp&lt;br&gt;
but i am going to migrate fuelphp to laravel.&lt;br&gt;
how do i have to do?&lt;br&gt;
Please help me.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
