<?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: Ndirangu Waweru</title>
    <description>The latest articles on DEV Community by Ndirangu Waweru (@nwaweru).</description>
    <link>https://dev.to/nwaweru</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%2F97523%2Fedaf4e91-18c5-465e-a32a-1db5d72fc8ad.jpg</url>
      <title>DEV Community: Ndirangu Waweru</title>
      <link>https://dev.to/nwaweru</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nwaweru"/>
    <language>en</language>
    <item>
      <title>Create a database and associate it to a user - MySQL</title>
      <dc:creator>Ndirangu Waweru</dc:creator>
      <pubDate>Mon, 17 Oct 2022 16:35:15 +0000</pubDate>
      <link>https://dev.to/nwaweru/create-a-database-and-associate-it-to-a-user-mysql-3640</link>
      <guid>https://dev.to/nwaweru/create-a-database-and-associate-it-to-a-user-mysql-3640</guid>
      <description>&lt;p&gt;Login to your MySQL &lt;code&gt;root&lt;/code&gt; account (or any other account with admin privileges):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mysql -u root -p
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create the database you want your new user to be associated with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CREATE DATABASE example_database;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create the new user:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CREATE USER 'example_user'@'localhost' IDENTIFIED BY 'password';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Grant the new user access to the newly created database:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GRANT ALL ON example_database.* TO 'example_user'@'localhost';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Login to MySQL with your new user:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mysql -u example_user -p
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check the databases under the new user:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;show databases;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Build something awesome!&lt;/p&gt;

</description>
      <category>database</category>
      <category>mysql</category>
      <category>administration</category>
      <category>dbadmin</category>
    </item>
    <item>
      <title>How to enable logs for Laravel Snappy</title>
      <dc:creator>Ndirangu Waweru</dc:creator>
      <pubDate>Wed, 07 Sep 2022 15:44:33 +0000</pubDate>
      <link>https://dev.to/nwaweru/how-to-enable-logs-for-laravel-snappy-295o</link>
      <guid>https://dev.to/nwaweru/how-to-enable-logs-for-laravel-snappy-295o</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$pdf-&amp;gt;setLogger(Log::channel('stack'));
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>laravel</category>
      <category>pdf</category>
      <category>laravelsnappy</category>
    </item>
    <item>
      <title>Hash passwords by default in Laravel</title>
      <dc:creator>Ndirangu Waweru</dc:creator>
      <pubDate>Wed, 11 Dec 2019 14:11:33 +0000</pubDate>
      <link>https://dev.to/nwaweru/hash-passwords-by-default-in-laravel-1bp9</link>
      <guid>https://dev.to/nwaweru/hash-passwords-by-default-in-laravel-1bp9</guid>
      <description>&lt;p&gt;Update your user model&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// App\Models\User

use Illuminate\Support\Facades\Hash;

...

/**
* Hash the password by default.
*/
public function setPasswordAttribute($password)
{
    $this-&amp;gt;attributes['password'] = Hash::make($password);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>laravel</category>
    </item>
    <item>
      <title>PHP Extensions for Laravel 6.x</title>
      <dc:creator>Ndirangu Waweru</dc:creator>
      <pubDate>Mon, 02 Dec 2019 08:15:55 +0000</pubDate>
      <link>https://dev.to/nwaweru/php-extensions-for-laravel-6-x-31of</link>
      <guid>https://dev.to/nwaweru/php-extensions-for-laravel-6-x-31of</guid>
      <description>&lt;p&gt;I recently upgraded to &lt;a href="https://www.php.net/archive/2019.php#2019-11-28-1"&gt;php 7.4&lt;/a&gt; and was curious about which extensions I really need for a basic &lt;code&gt;laravel new&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;On Ubuntu 18.04:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;sudo apt -y install php7.4 php7.4-zip php7.4-mbstring php7.4-xml&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;laravel new demo&lt;/code&gt; works!&lt;/p&gt;

</description>
      <category>php</category>
      <category>laravel</category>
    </item>
  </channel>
</rss>
