<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ravi Teja on Medium]]></title>
        <description><![CDATA[Stories by Ravi Teja on Medium]]></description>
        <link>https://medium.com/@insidert?source=rss-facf541dd89e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*3PdeUuWO9I8Ju02XSzepSQ.jpeg</url>
            <title>Stories by Ravi Teja on Medium</title>
            <link>https://medium.com/@insidert?source=rss-facf541dd89e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 09:10:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@insidert/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Fix Rollup failed to resolve import for Vue2, Laravel and Vite]]></title>
            <link>https://insidert.medium.com/fix-rollup-failed-to-resolve-import-for-vue2-laravel-and-vite-555e18447f3c?source=rss-facf541dd89e------2</link>
            <guid isPermaLink="false">https://medium.com/p/555e18447f3c</guid>
            <category><![CDATA[vitejs]]></category>
            <category><![CDATA[vuejs]]></category>
            <category><![CDATA[rollup]]></category>
            <category><![CDATA[laravel-mix]]></category>
            <dc:creator><![CDATA[Ravi Teja]]></dc:creator>
            <pubDate>Wed, 10 Apr 2024 18:33:29 GMT</pubDate>
            <atom:updated>2024-04-10T18:33:29.220Z</atom:updated>
            <content:encoded><![CDATA[<p>Upgrade to vite using vue2</p><blockquote>Originally posted on my blog: <a href="https://insidert.com/blog/fix-rollup-failed-to-resolve-import-for-vue2-laravel-vite/">Click here to read</a></blockquote><p>If you are using Vue2 in your Laravel project and is upgrading to vite, you will face this error while building the assets. We need to change vue config in vite.config.js file</p><pre>import { defineConfig } from &#39;vite&#39;;<br>import laravel from &#39;laravel-vite-plugin&#39;;<br>import vue from &#39;@vitejs/plugin-vue2&#39;;<br><br>export default defineConfig({<br>    plugins: [<br>      laravel({<br>        input: [<br>            &#39;resources/sass/vendor.scss&#39;,<br>            &#39;resources/js/vendor.js&#39;,<br>            &#39;resources/js/app.js&#39;,<br>        ],<br>        refresh: true}),<br>      vue({<br>          template: {<br>            transformAssetUrlsOptions: {<br>                base: null,<br>                includeAbsolute: false,<br>              },<br>          },<br>      }),<br>    ],<br>});</pre><p>The difference we must notice in the config file is <strong>transformAssetUrlsOptions</strong>.</p><p>For vue 3 projects, it will be <em>transformAssetUrls.</em></p><p>If you do not change this option, images inside the vue components will throw <strong>Rollup failed to resolve import “/img/imgname.png”</strong> error while running npm run build.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=555e18447f3c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Update Laravel Mix to Vite with Vue 2]]></title>
            <link>https://insidert.medium.com/update-laravel-mix-to-vite-with-vue-2-3f8a206835e6?source=rss-facf541dd89e------2</link>
            <guid isPermaLink="false">https://medium.com/p/3f8a206835e6</guid>
            <category><![CDATA[laravel-mix]]></category>
            <category><![CDATA[upgrade]]></category>
            <category><![CDATA[vitejs]]></category>
            <category><![CDATA[vuejs]]></category>
            <dc:creator><![CDATA[Ravi Teja]]></dc:creator>
            <pubDate>Wed, 10 Apr 2024 18:31:51 GMT</pubDate>
            <atom:updated>2024-04-10T18:31:51.371Z</atom:updated>
            <content:encoded><![CDATA[<p>Step by step upgrade guide.</p><blockquote>Originally posted on my blog: <a href="https://insidert.com/blog/update-laravel-mix-to-vite-with-vue2/">click here to read.</a></blockquote><p>Vite is the new asset bundler in Laravel. Upgrading to vite from mix is easy task. But few changes have to be made for projects that have Vue 2. Here are the steps:</p><h3>Upgrade steps</h3><ul><li>Follow the upgrade guide and install the dependencies. <a href="https://github.com/laravel/vite-plugin/blob/main/UPGRADE.md#migrating-from-laravel-mix-to-vite">Upgrade guide</a></li><li>Update npm scripts. npm update</li><li>Add vite.config.js file. I have the following setup.</li></ul><pre>import { defineConfig } from &#39;vite&#39;;<br>import laravel from &#39;laravel-vite-plugin&#39;;<br>import vue from &#39;@vitejs/plugin-vue2&#39;;<br><br>export default defineConfig({<br>    plugins: [<br>      laravel({<br>        input: [<br>            &#39;resources/sass/vendor.scss&#39;,<br>            &#39;resources/js/vendor.js&#39;,<br>            &#39;resources/js/app.js&#39;,<br>        ],<br>        refresh: true}),<br>      vue({<br>          template: {<br>            transformAssetUrlsOptions: {<br>                base: null,<br>                includeAbsolute: false,<br>              },<br>          },<br>      }),<br>    ],<br>});</pre><h3>Important config note:</h3><p>One difference we must notice in the config file is <strong>transformAssetUrlsOptions</strong>.</p><p>For vue 3 projects, it will be <em>transformAssetUrls.</em> If you do not change this option, images inside the vue components will throw <strong>Rollup failed to resolve import “/img/imgname.png”</strong> error while running npm run build.</p><h3>Vue component registration</h3><p>With mix, we used to require the SFC component and register globally like Vue.component(&quot;upload-image&quot;, require(&quot;./components/UploadImage.vue&quot;).default);</p><p>This way will not work with vite. So we need to import them.</p><pre>import vue from &#39;vue/dist/vue.js&#39;;<br>window.Vue = vue;<br><br>import UploadImage from &quot;./components/UploadImage.vue&quot;<br><br>Vue.component(&quot;upload-image&quot;, UploadImage);<br><br>new Vue({<br>  el: &quot;#app&quot;,<br>  data: {},<br>});</pre><p>My app.js file look like this after the changes</p><pre>import axios from &#39;axios&#39;;<br>import moment from &#39;moment&#39;;<br>import Echo from &#39;laravel-echo&#39;;<br>import pusher from &#39;pusher-js&#39;;<br>import * as bootstrap from &#39;bootstrap&#39;;<br><br>window.axios = axios;<br>window.moment = moment;<br>window.bootstrap = bootstrap;<br>window.axios.defaults.headers.common[&quot;X-Requested-With&quot;] = &quot;XMLHttpRequest&quot;;<br>let token = document.head.querySelector(&#39;meta[name=&quot;csrf-token&quot;]&#39;);<br>if (token) {<br>  window.axios.defaults.headers.common[&quot;X-CSRF-TOKEN&quot;] = token.content;<br>} else {<br>  console.error(&quot;CSRF Issue&quot;);<br>}</pre><h3>Bootstrap SCSS</h3><p>There are no major changes for compiling SCSS. My app.scss file looks like</p><pre>@import &quot;./variables&quot;;<br>@import &quot;../../node_modules/bootstrap/scss/bootstrap&quot;;</pre><h3>Accessing the files in blade</h3><pre>&lt;head&gt;<br>    &lt;meta charset=&quot;utf-8&quot;&gt;<br>    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1&quot;&gt;<br>    @vite(&#39;resources/sass/vendor.scss&#39;)<br>&lt;/head&gt;<br>&lt;body&gt;<br>    &lt;!-- all the content --&gt;<br>    @vite(&#39;resources/js/vendor.js&#39;)<br>    @vite(&#39;resources/js/app.js&#39;)<br>&lt;/body&gt;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f8a206835e6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to deploy Laravel application to a server]]></title>
            <link>https://insidert.medium.com/how-to-deploy-laravel-application-to-a-server-1cf682298807?source=rss-facf541dd89e------2</link>
            <guid isPermaLink="false">https://medium.com/p/1cf682298807</guid>
            <category><![CDATA[mysql]]></category>
            <category><![CDATA[vps]]></category>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[deployment]]></category>
            <dc:creator><![CDATA[Ravi Teja]]></dc:creator>
            <pubDate>Wed, 10 Apr 2024 18:27:54 GMT</pubDate>
            <atom:updated>2024-04-10T18:27:54.517Z</atom:updated>
            <content:encoded><![CDATA[<p>Step-by-step guide on deploying laravel application to a VPS.</p><blockquote>Originally posted on my blog: <a href="https://insidert.com/blog/how-to-deploy-laravel-to-a-server/">Click here to read.</a></blockquote><p>This is a step-by-step guide to setup your Laravel application on Vultr or Digital Ocean or any other VPS with root access.</p><h3>Selecting a server</h3><p>First you need to select a server in one of the service providers. I deploy all my servers on Vultr. I have been using this service since 2017. <a href="https://www.vultr.com/?ref=9367505-8H">Get 100$ as signup bonus on Vultr.</a></p><p>Or you can use DigitalOcean. <a href="https://m.do.co/c/84577e41997d">Get 200$ as signup bonus on DigitalOcean.</a></p><p><em>Important: The signup bonus expires after 2 months from signup. Be careful with the resources you create with them. If you are not careful you will be charged accordingly after the bonus duration.</em></p><p>This post is a collection of commands that helped me setup Laravel in a VPS. I have written this for myself to just copy and past the commands directly so that I don’t have to go to individual resources. Most of the resources are from <a href="https://serversforhackers.com/">serversforhackers.com</a> by <a href="https://twitter.com/fideloper">Chris Fidao.</a></p><h3>Creating a server</h3><p>After creating an account on Vultr or DigitalOcean, you should select a server size based on your needs and opt to install Ubuntu.</p><p>Please choose Ubuntu LTS version. If it is not LTS version, it will be hard to update our software — like PHP — in future.</p><h3>Login to your server</h3><p>After creating a server, you will be given the IP address and login credentials for root user.</p><p>You will need a ssh client to log into your newly created server. I use Windows Terminal app. You can also use git bash. But Terminal app is good.</p><p>To login, do ssh root@192.168.0.1 from your terminal app.</p><p>Replace 192.168.0.1 with the IP address of your server.</p><h3>Add a user</h3><p>After logging in as root, add a new user and add to sudo group.</p><pre>sudo adduser raviteja<br><br>usermod -aG sudo raviteja</pre><p>From here on, run commands as the new user with sudo permissions.</p><pre>sudo su raviteja</pre><ul><li><a href="https://serversforhackers.com/c/creating-users-and-ssh-security">Video</a></li></ul><h3>Setup SSH for the new user</h3><p>On your local machine, you need to create public and private keys. Run the below command from your local terminal — your windows system — to create the keys. All the keys should be in <em>.ssh</em> folder</p><p>If you do not have .ssh directly, create one. It will be in your <strong>c drive &gt; Users &gt; your_user_name_folder &gt; .ssh</strong></p><pre>cd ~/.ssh<br><br>ssh-keygen -o -a 100 -t ed25519 -f id_some_identifier</pre><p>Copy the public key</p><pre>cat id_some_identifier.pub</pre><p>On the server, add the public key. First, we need to create the directory and then paste the key in <em>authorized_keys</em> file.</p><pre>sudo su raviteja<br><br>mkdir ~/.ssh<br><br>cd ~/.ssh<br><br>nano authorized_keys</pre><ul><li><a href="https://serversforhackers.com/s/ssh-usage-tips-and-tricks">Video</a></li></ul><h3>Install PHP</h3><p>Installs the latest version if you have not added PPA package.</p><pre>sudo apt-get install git curl wget zip unzip</pre><pre>sudo add-apt-repository -y ppa:ondrej/php</pre><pre>sudo apt-get update</pre><pre>sudo apt-get install -y php8.2-fpm php8.2-cli php8.2-mysql \<br>  php8.2-mcrypt php8.2-gd php8.2-imap php8.2-curl \<br>  php8.2-mbstring php8.2-xml php8.2-bcmath php8.2-zip</pre><p>You can replace the version number if you are installing more latest versions.</p><ul><li><a href="https://serversforhackers.com/c/lemp-nginx-php-laravel">Video</a></li></ul><h3>Install Composer</h3><pre>php -r &quot;readfile(&#39;http://getcomposer.org/installer&#39;);&quot; | sudo php -- --install-dir=/usr/bin/ --filename=composer</pre><h3>Install Nginx</h3><pre>sudo apt-get install nginx</pre><p>Allow Nginx in firewall</p><pre>sudo ufw app list</pre><pre>sudo ufw allow &#39;nginx full&#39;</pre><pre>sudo ufw reload</pre><p>Change nginx config</p><pre>sudo nano /etc/nginx/sites-available/default</pre><p><strong>Note:</strong> We should add ssl_certificate details in the config only after installing ssl certificate with certbot. The certbot section is at the botton of this guide.</p><p>You can also refer laravel docs to get the config details.</p><pre>server {<br>  listen 80 default_server;<br>  server_name thedomain.in www.thedomain.in;<br>  return 301 https://thedomain.in$request_uri;<br>}<br><br>server {<br>  listen 443 ssl default_server;<br>  ssl_certificate      /etc/letsencrypt/live/&lt;thedomain.in&gt;/fullchain.pem;<br>  ssl_certificate_key  /etc/letsencrypt/live/&lt;thedomain.in&gt;/privkey.pem;<br>  root /var/www/ourprojectfolder/public;<br>  index index.php;<br>  location / {<br>    try_files $uri $uri/ /index.php?$query_string;<br>  }<br>  location ~ \.php$ {<br>    include snippets/fastcgi-php.conf;<br>    fastcgi_pass unix:/var/run/php/php8.0-fpm.sock;<br>  }<br>  location ~* (?:^|/)\. {<br>    deny all;<br>  }<br>  location ^~ /.well-known/acme-challenge/ {<br>    allow all;<br>  }<br>}</pre><p>Test the configuration everytime you change the nginx configs.</p><pre>sudo nginx -t</pre><pre>sudo systemctl reload nginx</pre><ul><li>Nginx setup in <a href="https://laravel.com/docs/8.x/deployment#nginx">Laravel docs</a></li></ul><h3>Setup Git &amp; Push to production</h3><p>It would be easy to push directly from your local machine. There are many other ways to push your code to the server. This will act as your starting point.</p><p>On your server:</p><pre>cd /var</pre><pre>sudo mkdir repo &amp;&amp; cd repo</pre><pre>sudo mkdir site.git &amp;&amp; cd site.git</pre><pre>sudo git init --bare</pre><p>Setup post-receive hoook</p><pre>cd /var/repo/site.git/hooks</pre><pre>sudo nano post-receive</pre><p>Add the contents to the post-recieve file</p><pre>#!/bin/sh<br>git --work-tree=/var/www/laravel --git-dir=/var/repo/site.git checkout -f</pre><p>Change the permission</p><pre>sudo chmod +x post-receive</pre><p>Change the ownership for the current user</p><pre>cd /var/repo<br><br>sudo chown -R raviteja site.git</pre><p>On your local system, inside your Laravel project</p><pre>git remote add production ssh://raviteja@example.com/var/repo/site.git</pre><pre># To push the changes to the server</pre><pre>git push production master</pre><p>If you are using main branch locally, do git push production main:master</p><p>Bare git repos defaults to master branch. You are free to change it.</p><ul><li><a href="https://devmarketer.io/learn/deploy-laravel-5-app-lemp-stack-ubuntu-nginx/">Dev Marketer Post</a></li></ul><h3>Set permissions</h3><pre>ps aux | grep php<br><br>cd /var/www/thelaravelappfolder<br><br>sudo chown -R www-data:raviteja storage bootstrap</pre><h3>Setup MySQL</h3><pre>sudo apt-get install -y mysql-server</pre><pre># Inside mysql console, run each command. Change the values as per your need.</pre><pre>create database yourdatabase</pre><pre>create user databaseclient@&#39;localhost&#39; identified by &#39;a-password&#39;;</pre><pre>grant all privileges on yourdatabase.* to databaseclient@&#39;localhost&#39;;</pre><h3>Import/Export database</h3><pre>// Export<br>mysqldump -u databaseclient -p yourdatabase | gzip &gt; the_database_file_name.sql.gz</pre><pre>// Import</pre><pre>gunzip &lt; 20122020_b.sql.gz | mysql -u databaseclient -p yourdatabase</pre><h3>Setup Redis</h3><pre>sudo apt-get install redis-server<br><br>redis-cli ping</pre><h3>Setup Supervisor for Queues</h3><p><a href="https://laravel.com/docs/8.x/queues#supervisor-configuration">Supervisor docs.</a></p><pre>sudo apt-get install supervisor</pre><p>Create new file <em>laravel-worker.conf</em> inside <em>/etc/supervisor/conf.d</em> directory.</p><pre>[program:laravel-worker]<br>process_name=%(program_name)s_%(process_num)02d<br>command=php /var/www/thelaravelfolder/artisan queue:work redis --tries=1 --timeout=3600 --max-time=3600<br>autostart=true<br>autorestart=true<br>stopasgroup=true<br>killasgroup=true<br>user=raviteja<br>numprocs=8<br>redirect_stderr=true<br>stdout_logfile=/home/raviteja/thelaravelfolder/worker.log<br>stopwaitsecs=3600</pre><p>Make this directory <em>/home/raviteja/thelaravelfolder/</em> for the log.</p><p>Start supervisor</p><pre>sudo supervisorctl reread</pre><pre>sudo supervisorctl update</pre><pre>sudo supervisorctl start laravel-worker:*</pre><pre>sudo supervisorctl status</pre><p>For timeout function to work on the queues, pcntl extension should be enabled.</p><pre>php -i | grep pcntl</pre><h3>Setup Cron for Scheduled jobs</h3><pre>crontab -e</pre><pre>* * * * * cd /var/www/laravelfolder &amp;&amp; php artisan schedule:run &gt;&gt; /dev/null 2&gt;&amp;1</pre><h3>SSL Certificate</h3><pre>sudo snap install core; sudo snap refresh core</pre><pre>sudo snap install --classic certbot</pre><pre>sudo ln -s /snap/bin/certbot /usr/bin/certbot</pre><pre>// This command will edit the nginx configuration<br>sudo certbot --nginx</pre><pre>// I use this command so that the nginx configuration is not edited<br>sudo certbot certonly --nginx</pre><pre>// testing to renew<br>sudo certbot renew --dry-run</pre><p>More instructions on the <a href="https://certbot.eff.org/">official website.</a></p><h3>Storage Symlink</h3><pre>php artisan storage:link</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1cf682298807" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Moving to cloudinary api V2]]></title>
            <link>https://insidert.medium.com/moving-to-cloudinary-api-v2-6de55e12d980?source=rss-facf541dd89e------2</link>
            <guid isPermaLink="false">https://medium.com/p/6de55e12d980</guid>
            <category><![CDATA[php]]></category>
            <category><![CDATA[cloudinary]]></category>
            <dc:creator><![CDATA[Ravi Teja]]></dc:creator>
            <pubDate>Wed, 10 Apr 2024 14:06:32 GMT</pubDate>
            <atom:updated>2024-04-10T14:06:32.855Z</atom:updated>
            <content:encoded><![CDATA[<p>Upload images to Cloudinary.</p><blockquote>Originally posted on my blog: <a href="https://insidert.com/blog/moving-to-cloudinary-api-v2/">Click here to read.</a></blockquote><p>Install Cloudinay PHP v2</p><p>In your composer.json file, add the dependency.</p><pre>&quot;require&quot;: {<br>  # other dependencies</pre><pre>  &quot;cloudinary/cloudinary_php&quot;: &quot;^2&quot;,<br>}</pre><p>Do composer update</p><p>Inside your controller</p><pre>$image_to_upload = request()-&gt;file(&#39;avatar&#39;);</pre><pre>$url = Images::store(<br>    $image_to_upload-&gt;getRealPath(),<br>    $folder,<br>    $file_name<br>);</pre><p>The upload function is handled by Images class.</p><pre>&lt;?php<br><br>namespace App\Images;<br><br>class Images<br>{<br>  public function store($image, $folder, $file_name)<br>  {<br>    $config = Configuration::instance([<br>      &#39;cloud&#39; =&gt; [<br>        &#39;cloud_name&#39; =&gt; env(&#39;CLOUDINARY_CLOUD_NAME&#39;), <br>        &#39;api_key&#39; =&gt; env(&#39;CLOUDINARY_API_KEY&#39;), <br>        &#39;api_secret&#39; =&gt; env(&#39;CLOUDINARY_API_SECRET&#39;)<br>      ],<br>      &#39;url&#39; =&gt; [<br>        &#39;secure&#39; =&gt; true]]);<br>    new Cloudinary($config);<br>    $details = (new UploadApi())-&gt;upload($image, $image_data);<br>    return $details[&#39;secure_url&#39;];<br>  }<br>}</pre><p>This function will return the secure url for the image uploaded to Cloudinary.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6de55e12d980" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Increase file upload size in Nginx and PHP]]></title>
            <link>https://insidert.medium.com/increase-file-upload-size-in-nginx-and-php-c18f81c98339?source=rss-facf541dd89e------2</link>
            <guid isPermaLink="false">https://medium.com/p/c18f81c98339</guid>
            <category><![CDATA[php]]></category>
            <category><![CDATA[file-upload]]></category>
            <category><![CDATA[nginx]]></category>
            <dc:creator><![CDATA[Ravi Teja]]></dc:creator>
            <pubDate>Wed, 10 Apr 2024 14:03:11 GMT</pubDate>
            <atom:updated>2024-04-10T14:03:11.807Z</atom:updated>
            <content:encoded><![CDATA[<p>Handle bigger file uploads.</p><blockquote>Originally posted on my blog: <a href="https://insidert.com/blog/increase-file-upload-size-nginx-php/">Click here to read.</a></blockquote><p>Change the nginx config file. (Assuming you are running on linux and using nginx.)</p><pre>sudo nano /etc/nginx/nginx.conf</pre><pre># In the http block, add the max body size.</pre><pre>http {<br>    // other config<br>    client_max_body_size 100M;<br>}</pre><p>Check the configuration.</p><pre>sudo nginx -t</pre><p>Change config in php.ini file</p><pre>sudo nano /etc/php/8.2/fpm/php.ini</pre><pre># Change the following lines </pre><pre>upload_max_filesize = 100M  ; Maximum upload file size<br>post_max_size = 100M       ; Maximum size of POST data</pre><p>Once it is done, restart the php-fpm</p><pre>sudo systemctl restart php8.2-fpm</pre><p>Replace php8.2 with the version you installed on your server.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c18f81c98339" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Debugging local Laravel project on Mobile]]></title>
            <link>https://insidert.medium.com/debugging-local-laravel-project-on-mobile-88c124868153?source=rss-facf541dd89e------2</link>
            <guid isPermaLink="false">https://medium.com/p/88c124868153</guid>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[mobile]]></category>
            <category><![CDATA[chrome]]></category>
            <category><![CDATA[debugging]]></category>
            <dc:creator><![CDATA[Ravi Teja]]></dc:creator>
            <pubDate>Wed, 10 Apr 2024 13:59:29 GMT</pubDate>
            <atom:updated>2024-04-10T13:59:29.543Z</atom:updated>
            <content:encoded><![CDATA[<p>Open your local project on mobile to debug.</p><blockquote>Originally posted on my blog: <a href="https://insidert.com/blog/debugging-local-laravel-project-on-mobile/">Click here to read</a>.</blockquote><p>There will be times where you need to debug your laravel app on mobile. This is one of the ways to connect.</p><ul><li>Connect your laptop and mobile to the same WiFi.</li><li>Check your local ip address. Open cmd and type <strong>ipconfig</strong> Check IPV4 address. Eg: 192.168.1.7</li><li>Start your laravel app with php artisan serve --host=192.168.1.7</li><li>In a new terminal, start vite. npm run dev -- --host=192.168.1.7</li><li>Open the url in your mobile. http://192.168.1.7:8000 and you can access the website including the hotreload.</li></ul><h3>Inspecting mobile website</h3><p>It is hard to inspect the website on mobile browser. For that we can use remote debugging via usb.</p><ul><li>Connect your mobile to your laptop with usb.</li><li>Enable usb debugging on your mobile.</li><li>Allow access when prompted.</li><li>Go to chrome://inspect/#devices in chrome.</li><li>There you need to check <strong>Discover USB devices.</strong></li><li>Below you can see your mobile and click on <em>inspect</em> to open.</li></ul><p><a href="https://developer.chrome.com/docs/devtools/remote-debugging/local-server">Refer chrome docs for more</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=88c124868153" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter Target API 31]]></title>
            <link>https://insidert.medium.com/flutter-target-api-31-2485b27d72c7?source=rss-facf541dd89e------2</link>
            <guid isPermaLink="false">https://medium.com/p/2485b27d72c7</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[play-store]]></category>
            <dc:creator><![CDATA[Ravi Teja]]></dc:creator>
            <pubDate>Wed, 08 Mar 2023 16:45:30 GMT</pubDate>
            <atom:updated>2024-04-10T18:35:13.859Z</atom:updated>
            <content:encoded><![CDATA[<p>If your flutter app is throwing an error while publishing to Play Store to update to target api to 31, this is the simple fix.</p><p>Originally posted on my blog: <a href="https://insidert.com/blog/flutter-target-api-31-and-above/">Click here to read.</a></p><p>Inside android &gt; app &gt; build.gradle</p><pre>defaultConfig {<br>  // other values<br>  targetSdkVersion 31<br>}</pre><p>Build your app and republish to Play Store.</p><p>Android will target different SDK version when there are new releases. Based on them, change the number.</p><p>If using the imports from local.properties, do the following</p><pre>def targetSdkVersion = localProperties.getProperty(&#39;flutter.targetSdkVersion&#39;)<br>if (targetSdkVersion == null) {<br>    targetSdkVersion = &#39;31&#39;<br>}<br><br>defaultConfig {<br>  # other configs<br>  targetSdkVersion targetSdkVersion<br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2485b27d72c7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting up Bootstrap, Vue SFC in Laravel 9+ using Vite]]></title>
            <link>https://insidert.medium.com/setting-up-bootstrap-vue-sfc-in-laravel-9-using-vite-44cd48d37573?source=rss-facf541dd89e------2</link>
            <guid isPermaLink="false">https://medium.com/p/44cd48d37573</guid>
            <category><![CDATA[vuejs]]></category>
            <category><![CDATA[vitejs]]></category>
            <category><![CDATA[scss]]></category>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[bootstrap]]></category>
            <dc:creator><![CDATA[Ravi Teja]]></dc:creator>
            <pubDate>Mon, 13 Feb 2023 12:56:17 GMT</pubDate>
            <atom:updated>2024-04-10T18:36:01.960Z</atom:updated>
            <content:encoded><![CDATA[<p>If you are starting with Laravel 9, you need to manually setup the Vue Single file components and Bootstrap as follows.</p><p>Originally posted on my blog: <a href="https://insidert.com/blog/setting-up-bootstrap-vue-sfc-in-laravel-9-and-above-using-vite/">Click here to read.</a></p><h4>The installations</h4><p>Before installing the new dependencies, remove the node_modules folder by doing <strong>rm -rf node_mouldes </strong>from git bash inside your project folder.</p><p>Update Laravel vite plugin to its latest version, as of this writing, this is how I changed my package.json entry</p><pre>&quot;laravel-vite-plugin&quot;: &quot;^0.7.4&quot;</pre><p>After this, do <strong>npm install </strong>and then install the following</p><pre>npm install --save-dev @vitejs/plugin-vue<br><br>npm install --save-dev sass<br><br>npm install bootstrap@5.3.0-alpha1</pre><p>Next change app.js file to the following:</p><pre>import &#39;./bootstrap&#39;;<br><br>import { createApp } from &quot;vue/dist/vue.esm-bundler&quot;;<br><br>// Import all your components here.<br>import RegistrationType from &#39;./components/RegistrationType.vue&#39;;<br><br>const app = createApp({<br>  components: {<br>    RegistrationType<br> }<br>});<br><br>app.mount(&#39;#app&#39;)</pre><p>To customize Bootstrap, create a folder scss inside resources and create a file app.scss</p><pre>@import &quot;../../node_modules/bootstrap/scss/functions&quot;;<br>@import &quot;./variables&quot;;<br>@import &quot;../../node_modules/bootstrap/scss/bootstrap.scss&quot;;</pre><p>The variables file is your custom changes for Bootstrap.</p><p>You are done setting up at this point and all you need is to import them in your blade files.</p><p>Just do:</p><pre>&lt;html lang=&quot;en&quot;&gt;<br>  &lt;head&gt;<br>    &lt;meta charset=&quot;utf-8&quot;&gt;<br>    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1&quot;&gt;<br>    &lt;title&gt;My App&lt;/title&gt;<br>    @vite(&#39;resources/scss/app.scss&#39;)<br><br>  &lt;/head&gt;<br>&lt;body&gt;<br><br>&lt;!-- your code --&gt;<br><br> @vite(&#39;resources/js/app.js&#39;)<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><p>You can do them in one-line as explained the docs. I like adding them at difference sections, so I added scss file in the head and js at the bottom.</p><p>Happy coding.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=44cd48d37573" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fix pod install and update for Flutter on iOS, M1 mac.]]></title>
            <link>https://insidert.medium.com/fix-pod-install-and-update-for-flutter-on-ios-m1-mac-9f695f6c04b2?source=rss-facf541dd89e------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f695f6c04b2</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Ravi Teja]]></dc:creator>
            <pubDate>Sun, 27 Mar 2022 07:20:06 GMT</pubDate>
            <atom:updated>2024-04-10T18:38:02.436Z</atom:updated>
            <content:encoded><![CDATA[<p>Originally posted on my blog: <a href="https://insidert.com/blog/fix-pod-install-update-for-flutter-on-ios-m1mac/">Click to read here</a></p><pre>arch -x86_64 pod install </pre><p>Use the above command to install and update pod dependencies in your Flutter project if you are on M1</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f695f6c04b2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fix flutterfire is not recognized on macos]]></title>
            <link>https://insidert.medium.com/fix-flutterfire-is-not-recognized-on-macos-8c80d47e7fde?source=rss-facf541dd89e------2</link>
            <guid isPermaLink="false">https://medium.com/p/8c80d47e7fde</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[flutter-app-development]]></category>
            <category><![CDATA[firebase]]></category>
            <category><![CDATA[firebasecloudmessaging]]></category>
            <dc:creator><![CDATA[Ravi Teja]]></dc:creator>
            <pubDate>Fri, 18 Feb 2022 09:46:29 GMT</pubDate>
            <atom:updated>2024-04-10T18:40:01.828Z</atom:updated>
            <content:encoded><![CDATA[<p>If you are new to flutter development and working on mac to develop apps, you may run into flutterfire not recognised command while adding the Firebase CLI.</p><p>Originally posted on my blog: <a href="https://insidert.com/blog/fix-flutterfire-is-not-recognized-on-macos/">Click to read here.</a></p><p>You need to follow these steps.</p><ol><li>You need to install firebase-cli first. <a href="https://firebase.google.com/docs/cli">https://firebase.google.com/docs/cli</a> and check your firebase projects are displayed locally.</li><li>Install futterfire-cli <a href="https://firebase.flutter.dev/docs/cli">https://firebase.flutter.dev/docs/cli</a> For which you need nodejs installed on your system.</li><li>dart pub global activate flutterfire_cli activates the cli.</li><li>flutterfire configure configures the necessary firebase tools for your project.</li></ol><p>At step 4, you may run into the command not recognized error. You need to export the pub-cache/bin to your path.</p><pre>export PATH=&quot;$PATH:$HOME/Devtools/Flutter/bin:$HOME/.pub-cache/bin&quot;</pre><p>After doing this, refresh the terminal by running</p><pre>source $HOME/.zshrc</pre><p>Check whether your paths have been updated</p><pre>echo $PATH</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c80d47e7fde" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>