<?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: T9</title>
    <description>The latest articles on DEV Community by T9 (@t9).</description>
    <link>https://dev.to/t9</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%2F740876%2Ff6fa6a47-a768-426b-88a5-4a0b171c755a.png</url>
      <title>DEV Community: T9</title>
      <link>https://dev.to/t9</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/t9"/>
    <language>en</language>
    <item>
      <title>How to Implement Localization in a Spring Boot Application with Dynamic Language Switching</title>
      <dc:creator>T9</dc:creator>
      <pubDate>Thu, 25 Jul 2024 19:27:09 +0000</pubDate>
      <link>https://dev.to/t9/how-to-implement-localization-in-a-spring-boot-application-with-dynamic-language-switching-1eh6</link>
      <guid>https://dev.to/t9/how-to-implement-localization-in-a-spring-boot-application-with-dynamic-language-switching-1eh6</guid>
      <description>&lt;p&gt;Localization is essential for creating applications that cater to diverse user bases by supporting multiple languages and regions. In this guide, we’ll walk you through setting up localization in a Spring Boot application, focusing on switching between English and Arabic languages dynamically using jQuery.&lt;/p&gt;

&lt;p&gt;Here is the &lt;a href="https://www.t9chnih.com/blog/how-to-implement-localization-in-a-spring-boot-application-with-dynamic-language-switching" rel="noopener noreferrer"&gt;link&lt;/a&gt; for the tutorial  &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>java</category>
    </item>
    <item>
      <title>ما هو لارفيل برييز؟</title>
      <dc:creator>T9</dc:creator>
      <pubDate>Sun, 24 Mar 2024 12:39:36 +0000</pubDate>
      <link>https://dev.to/t9/m-hw-lrfyl-bryyz-4bml</link>
      <guid>https://dev.to/t9/m-hw-lrfyl-bryyz-4bml</guid>
      <description>&lt;p&gt;Laravel Breeze هو مجموعة أدوات ابتدائية بسيطة وخفيفة الوزن لتطبيقات Laravel، توفر تنفيذًا بسيطًا لجميع الميزات التي تحتاجها لبدء التوثيق في مشروع Laravel جديد. Laravel، وهو إطار عمل PHP شهير لتطوير الويب، يشمل عدة خيارات لبنية التوثيق، ويعد Breeze واحدًا من أبسط هذه الخيارات وأكثرها سهولة في الاستخدام.&lt;/p&gt;

&lt;p&gt;تم تقديمه من قبل فريق Laravel، يستخدم Breeze Blade، نظام قوالب Laravel الافتراضي، لعرضه، مما يجعله خيارًا رائعًا للمطورين الذين يفضلون العمل مع تطبيقات مُرَكَّبَة على جانب الخادم باستخدام تقنيات Laravel التقليدية. يوفر الهيكل الأساسي لتسجيل الدخول، التسجيل، التحقق من البريد الإلكتروني، إعادة تعيين كلمة المرور، وتأكيد كلمة المرور، جنبًا إلى جنب مع المسارات والتحكمات والاختبارات المقابلة.&lt;/p&gt;

&lt;p&gt;بساطة Breeze تكمن في تركيزه على توفير الأساسيات للتوثيق، دون أي تعقيدات أو اعتمادات إضافية. هذا يجعله نقطة انطلاق ممتازة لتعلم ميزات التوثيق في Laravel أو لبناء مشروع لا يتطلب المزيد من الميزات المتقدمة لخيارات التوثيق الأخرى في Laravel، مثل Laravel Jetstream أو Laravel Fortify.&lt;/p&gt;

&lt;p&gt;لإعداد Laravel Breeze في مشروع Laravel، عادةً ما تقوم بتشغيل عدة أوامر لتثبيته عبر Composer، مدير الاعتمادات في Laravel، ثم تشغيل الترحيلات لإعداد جداول قاعدة البيانات اللازمة. يقوم هذا الإجراء بإعداد بنية التوثيق، مما يسمح للمطورين بالانتقال بسرعة إلى بناء الجوانب الفريدة من تطبيقاتهم.&lt;/p&gt;

&lt;p&gt;لتثبيت Laravel Breeze في مشروع Laravel، يمكنك اتباع الخطوات التالية. هذه الخطوات تفترض أنك قد أنشأت بالفعل مشروع Laravel جديد ولديك Composer مثبتًا على نظامك، حيث يعتبر Composer أداة أساسية لإدارة الاعتمادات في تطبيقات PHP.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.t9chnih.com/blog/ma-ho-larfyl-bryyz"&gt;لكيفية التحميل&lt;/a&gt;&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>php</category>
    </item>
    <item>
      <title>How to find average and count in Laravel ? Tips</title>
      <dc:creator>T9</dc:creator>
      <pubDate>Sun, 05 Jun 2022 01:15:16 +0000</pubDate>
      <link>https://dev.to/t9/how-to-find-avg-and-count-in-laravel-tips-2bj7</link>
      <guid>https://dev.to/t9/how-to-find-avg-and-count-in-laravel-tips-2bj7</guid>
      <description>&lt;p&gt;I added a comment Model in my application, and it has a rating and comments section. However, I wanted to display the average rating of a company and the number of comments for that company in the index page.&lt;/p&gt;

&lt;p&gt;Here is how I did it, using Eloquent functions withAvg and withCount:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Http\Contollers\CompanyController.php

public function index()
    {
        $company = company::withAvg('rating as ratings', 'rating')-&amp;gt;withCount('comment as comments')-&amp;gt;latest()-&amp;gt;filter()-&amp;gt;paginate(12);
         return view('Company.Record.index', compact('company'));

    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I hope it's useful.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>laravel</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How to seed Roles in Laravel using Seeder. (Tips)</title>
      <dc:creator>T9</dc:creator>
      <pubDate>Sun, 05 Jun 2022 00:52:49 +0000</pubDate>
      <link>https://dev.to/t9/how-to-seed-roles-in-laravel-using-seeder-tips-159o</link>
      <guid>https://dev.to/t9/how-to-seed-roles-in-laravel-using-seeder-tips-159o</guid>
      <description>&lt;p&gt;I was looking for a way to seed roles to the database after refresh, I couldn't find a suitable solution on the internet and I tried to use Faker function called &lt;strong&gt;randomElements();&lt;/strong&gt;, but It migrated the roles in a random order.&lt;/p&gt;

&lt;p&gt;Code in Factory &lt;em&gt;RoleFactory.php&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;protected $role = Role::class;
    public function definition()
    {
        return [
            'Role' =&amp;gt; $this-&amp;gt;faker-&amp;gt;unique()-&amp;gt;randomElement($array = array('Admin', 'Student', 'Supervisor')),
        ];
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;However, I found a way that worked for me on the Laravel Docs using Array seeding.&lt;br&gt;
First run the command below:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;php artisan make:seeder RoleSeeder&lt;/code&gt;&lt;br&gt;
Then write/copy the following code to &lt;em&gt;RoleSeeder.php&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class RoleSeeder extends Seeder
{
public function run()
    {
        Role::factory(3)-&amp;gt;state(new Sequence(
            ['id' =&amp;gt; 1, 'Role' =&amp;gt; 'Admin'],
            ['id' =&amp;gt; 2, 'Role' =&amp;gt; 'Student'],
            ['id' =&amp;gt; 3, 'Role' =&amp;gt; 'Supervisor'],
        ))-&amp;gt;create();
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Lastly, run the following command.&lt;br&gt;
&lt;code&gt;php artisan db:seed --class=RoleSeeder&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;I hope it is useful.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>laravel</category>
      <category>tutorial</category>
      <category>database</category>
    </item>
  </channel>
</rss>
