oliviacrter's avatar

oliviacrter was awarded Best Answer+1000 XP

3mos ago

You don’t need to prop-drill or use provide/inject for usePage() data. In Inertia, the recommended approach is to access shared props directly via usePage() wherever they’re needed. It’s already reactive and available to all components, so prop drilling just adds unnecessary complexity. A clean pattern is to wrap it in a small composable: Copy code Js import { computed } from 'vue' import { usePage } from '@inertiajs/vue3'

export function useAuth() { const page = usePage() const auth = computed(() => page.props.auth ?? 'Guest') return { auth } } Then you can use it in any component: Copy code Js import { useAuth } from '@/composables/useAuth' const { auth } = useAuth() This keeps things simple, avoids repetition, and follows Inertia’s intended design.

oliviacrter's avatar

oliviacrter wrote a reply+100 XP

3mos ago

If you’re planning to fetch electricity bill data by reference number, one important thing to keep in mind is legal access. Scraping data directly from official utility websites without permission can violate their terms. A safer and more practical approach is to build a helper platform that guides users to check their bills online using publicly accessible methods, without storing or scraping private data. For example, I’ve seen similar implementations where users simply enter their reference number and the system redirects or helps them retrieve bill details in a user-friendly way. One such implementation is available here: fescoebillcheck.pk. From a Laravel perspective, you can: Use Laravel HTTP client (Guzzle) instead of raw cURL Validate and sanitize reference numbers Avoid storing sensitive customer data Focus on UX, caching, and performance rather than scraping databases This approach keeps things scalable, legal, and much easier to maintain in Laravel.

oliviacrter's avatar

oliviacrter liked a comment+100 XP

3mos ago

What type of projects should I have if I want to start applying for Junior Laravel Roles? Also what technologies should I use, is DevOps Tools a must for any Role including Containers like Docker, Configuration Management Tools like Ansible, Chef, or Puppet and an Automation Server Tools such as Jenkins, Circle CI, or maybe even Github Actions and Code Coverage Tools with Static Code Analysis Tools along side Unit Testing and Performance Testing using JMeter. So basically what I listed, is DevOps... is all that needed to show HR Managers and the Team I will be working with I know what I am doing?

I have been told also to push every code change commit to Github instead of manually doing it through the UI... So I think that would help.

Also should I use a Cloud Computing Provider like AWS, GCP, or Azure? Maybe just a Infrastructure as Code Provision using CloudFormation, an EC2 Virtual Server that holds all the Database, Application Server, and Web Server together just to keep it simple... or should I also create an RDS at least? Should I also look into using Kubernetes if I want to impress HR Managers and the Team.

I think a Cache like Redis would be nice to have either way. But I could be wrong.

Taking it a bit more complex (this could be me over thinking...) Should I look into different types of Caches (Client, CDN, Web Server, Application, Database) Should I use and setup a CDN? Should I use or choose a certain type of Database or use multiple types using both RDBMS/NoSQL? Should I use Database techniques like Sharding, Federation, and Denormalization? Should I choose a Architecture like SOA, Microservices, N-Tier? (which would change my AWS setup) Should I setup Monitoring with Tools like New Relic or Data Dog? Should I implement things like Circuit Breakers, Bulk Heads, etc...

There is so many things that can be of importance including "System Design" also but think I would be making this post hard to take in...

I know that Security is a topic in itself and there will be a Security Team to guide the Development Team on how to implement Security... I think if I am right. Obviously knowing about the OWASP Top 10 and other things helps a Junior I would suppose.

So what should I do in order to impress HR and the Team I will be working with, if not with a Team, then what are they looking for in me that they need? What are they looking for in projects that is "Junior" Level ready? I have read that since the rise of AI, that Junior Level Roles are becoming obsolete, and Juniors are now expected to know DevOps, System Design, Architecture...

So coming from Web Developers who have already made it inside the industry, what do I have to do to get a job? Maybe if I setup a checklist it be easier for someone to answer this...

So what kind of Projects do I need to do or have in my Portfolio, and what technologies do I need to use? I think this would help me out on figuring out what I need to do...

oliviacrter's avatar

oliviacrter wrote a reply+100 XP

3mos ago

You don’t need to prop-drill or use provide/inject for usePage() data. In Inertia, the recommended approach is to access shared props directly via usePage() wherever they’re needed. It’s already reactive and available to all components, so prop drilling just adds unnecessary complexity. A clean pattern is to wrap it in a small composable: Copy code Js import { computed } from 'vue' import { usePage } from '@inertiajs/vue3'

export function useAuth() { const page = usePage() const auth = computed(() => page.props.auth ?? 'Guest') return { auth } } Then you can use it in any component: Copy code Js import { useAuth } from '@/composables/useAuth' const { auth } = useAuth() This keeps things simple, avoids repetition, and follows Inertia’s intended design.

oliviacrter's avatar

oliviacrter liked a comment+100 XP

3mos ago

I have this in App.vue

<script setup>
	import { computed } from 'vue';
	import { usePage } from '@inertiajs/vue3'

	const page = usePage();
	const auth = computed(() => page.props.auth ?= "Guest");
</script>

<template>
	You are logged in as {{ auth }}!
</template>

But then, I also need to use auth on other pages, should I just declare it in inertia declaration then use provide/inject like this

const page = usePage();
const auth = computed(() => page.props.auth ?= "Guest");

createInertiaApp({
  setup({ el, App, props, plugin }) {
    createApp({ render: () => h(App, props) })
    	.use(plugin)
    	.component('Head', Head)
		.provide('auth', auth)
    	.mount(el)
  }
})

or do I need to do that code block every time I needed to use the auth?