harunsir

Member Since 5 Years Ago

Experience Points
2,980
Total
Experience

2,020 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
19
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start your engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-in-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

  • Community Pillar

    Earned once your experience points ranks in the top 10 of all Laracasts users.

Level 1
2,980 XP
Mar
25
2 weeks ago
Activity icon

Started a new Conversation Input:number Default Value Not Updating

input type="number" name="day" id="dayValue" value="{{ $day_id }}"

            <button onclick="go()" >Go</button>


	

    function go() {            
        var day = document.getElementById("dayValue");
        var val = day.value;
        if (val != '') {
            window.location.href = '/day/' + val;
        } else {
            alert('Please select a day!');
        }
    }

I works fine in desktop view but in mobile view any number in input field alerts 'Please select a day'. On mount $day_id is '' by default. So it always render as ''.

Is there any suggestion?

Note: I am using it in Laravel 8 inside a component.

Mar
23
2 weeks ago
Activity icon

Started a new Conversation Livewire: Pass Input Value To Component Without Wire:model

Is it possible to send input:number value to component without wire:model such as 'this' or $event or anything else?

Mar
19
3 weeks ago
Activity icon

Started a new Conversation Laravel Livewire: Variable From Component To Blade

Component A is inside Blade B. Variable x is inside Component A. I want to show it in the Blade outside the Component. Is there any way to pass the variable to the Blade?

Mar
09
1 month ago
Activity icon

Started a new Conversation Ctrl+click In Alpine JS

I want to fire an event at ctrl+click. Is it possible? How?

Mar
05
1 month ago
Activity icon

Awarded Best Reply on How To Make Double Click On Livewire?

Until double click is added to livewire, this is a better way to perform both single and double click on a unique Dom.

Note: You need to add Alpine JS to your Blade

In Blade

<div x-data>
        <div wire:click="singleClick('Single')">
            <button x-on:dblclick="$wire.doubleClick('Double')">Click Here</button>
        </div>
        {{ $msg }} Click emited.
 </div>

In Component

public $msg;   

public function singleClick($param)
{
    $this->msg = $param;
}
public function doubleClick($param)
{
    $this->msg = $param;
}
Activity icon

Replied to How To Make Double Click On Livewire?

Until double click is added to livewire, this is a better way to perform both single and double click on a unique Dom.

Note: You need to add Alpine JS to your Blade

In Blade

<div x-data>
        <div wire:click="singleClick('Single')">
            <button x-on:dblclick="$wire.doubleClick('Double')">Click Here</button>
        </div>
        {{ $msg }} Click emited.
 </div>

In Component

public $msg;   

public function singleClick($param)
{
    $this->msg = $param;
}
public function doubleClick($param)
{
    $this->msg = $param;
}
Activity icon

Replied to How To Make Double Click On Livewire?

In association with Alpine JS, I do the job like the following...

In Component

public $msg = null;

public function singleClick()
{
    $this->msg = 'singleClick';
}

public function doubleClick()
{
    $this->msg = 'doubleClick';
}

In Blade

<div x-data>
    <button x-on:click="$wire.singleClick()" x-on:dblclick="$wire.doubleClick()">test</button> 
    <br>
    {{ $msg }} emited.
</div>
Activity icon

Started a new Conversation How To Make Double Click On Livewire?

I have tried but not be able to make double click on livewire. Is it possible?

Mar
02
1 month ago
Activity icon

Started a new Conversation Laravel: Detect And Kill Multi Login With Unique User Name And Password.

Is it possible in Laravel 8 to detect and kill multi login with unique User Name and Password? I want my users not to share their user credentials.

Feb
28
1 month ago
Activity icon

Started a new Conversation Where To Host New Laravel Site

I want to host my new Laravel App. I am new and my budget is low. Where should I host my site?

Feb
21
1 month ago
Activity icon

Started a new Conversation Method Illuminate\Validation\Validator::validateRegx Does Not Exist

I wrote validation logic like the following that show the above message.

   $request->validate([
        'name'=>'required|regx:/^[a-zA-Z0-9.-_ ]+$/u|max:150',
        'category'=>'regx:/^[a-zA-Z0-9.-_ ]+$/u|max:150',
        'description'=>'regx:/^[a-zA-Z0-9.-_ ]+$/u|max:1500',
        'url'=>'url|required|max:500|unique:resource_suggests',
        'owner'=>'alpha',
    ]);
Dec
10
4 months ago
Activity icon

Started a new Conversation Laravel Livewire Variable Flow

I have a variable age=23. I want to make flow of this variable from URL to Livewire Component like this.

URL -> Controller (via route) -> Blade -> Livewire Component

What will be the easy/best way?

Any Code Example, if possible.

Nov
09
5 months ago
Activity icon

Replied to Scoped CSS In Livewire Component

Hi, rodrigo, Thank you. I have found an Idea.

Can you make a pull request to make it available in future?

Activity icon

Started a new Conversation Scoped CSS In Livewire Component

I know how to use (scoped) css in vue component. But is there any chance to use css in Livewire Component like vue component?

Activity icon

Started a new Conversation Livewire Show/hide A Div According To The Media Queries

Is there any classes in Livewire similar to Bootstrap's d-block, d-none?

Nov
07
5 months ago
Activity icon

Started a new Conversation Laravel Inertia: Search Engines Do Not Index Page Contents

My website URL is: https://uicolorgenerator.com

As you see my home page contains a post. It has more than 300 words.

I checked my page word count with this tool: https://wordcounter.net/website-word-count

I found it counted only 11 words.

Here is my page structure...

  1. Inside app.blade.php

    @inertia

  2. web.php

    Route::get('/', function () { return Inertia::render('Home'); });

  3. The post is inside

    resources> js > pages > home.vue

The site has only one route.

How can I make my page contents visible to search engines.

Nov
06
5 months ago
Activity icon

Started a new Conversation Laravel 8: Undefined Variable: Message

I followed this page https://laravel.com/docs/8.x/blade#components and paste

<x-alert type="error" :message="$message"/>

It shows the error message like this

Undefined variable: message

What is the thing I have forgot?

Nov
03
5 months ago
Activity icon

Started a new Conversation The Mix Manifest Does Not Exists

I uploaded my Laravel site to the live server. Now it shows the above error message. Site URL is https://uicolorgenerator.com

Oct
30
5 months ago
Activity icon

Awarded Best Reply on What Is The Alternative Of @auth To Use In Laravel Component?

I have found it like

v-if="$page.user"
Activity icon

Replied to What Is The Alternative Of @auth To Use In Laravel Component?

I have found it like

v-if="$page.user"
Activity icon

Started a new Conversation What Is The Alternative Of @auth To Use In Laravel Component?

In blade we use @auth to check logged in user. How to use it in Inertia Component?

Oct
27
5 months ago
Activity icon

Replied to Laravel 8 Inertia Link Not Working: Error Message - Missing Required Prop: "href"

yes and I can not find out what is the problem.

Activity icon

Replied to Laravel 8 Inertia Link Not Working: Error Message - Missing Required Prop: "href"

color/index.vue

<template>
  <div>
    <inertia-link herf="/login" style="color: #7700dd; font-family: 'Concert One', cursive">Home</inertia-link>    
 </div>
</template>
<script>
  export default {
         props:['has_login', 'auth']
     }
 </script>

If I edit href like this, is still throws the same error message (Missing required prop: "href")

<inertia-link :herf="'/'" >Home</inertia-link>
Activity icon

Started a new Conversation Laravel 8 Inertia Link Not Working: Error Message - Missing Required Prop: "href"

In Laravel 8, Inertia Link is not working on my Project. Here is coding details...

app.js

require('./bootstrap');

import Vue from 'vue';
// import Vuex from 'vuex';



import { InertiaApp } from '@inertiajs/inertia-vue';
import { InertiaForm } from 'laravel-jetstream';
import PortalVue from 'portal-vue';
import { store } from './store';

Vue.use(InertiaApp);
Vue.use(InertiaForm);
Vue.use(PortalVue);
// Vue.use(Vuex);


const app = document.getElementById('app');

new Vue({
    render: (h) =>
        h(InertiaApp, {
            props: {
                initialPage: JSON.parse(app.dataset.page),
                resolveComponent: (name) => require(`./Pages/${name}`).default,
            },

        }),
    store,
}).$mount(app);

Index.vue

<inertia-link herf="/login" >Home</inertia-link>

export default {
  props:['has_login', 'auth']
}

web.php

Route::get('/color', [ColorController::class, 'color']);

Controller

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\Auth;
use Inertia\Inertia;

class ColorController extends Controller

{
    public function color()
    {
        return Inertia::render('color/index', [
            'has_login'=>Route::has('login'),
            'auth'=>Auth::check(),
        ]);
    }
 }

Error in Console

[Vue warn]: Missing required prop: "href"

I put 'Plugin' in app.js like this

import { InertiaApp, Plugin } from '@inertiajs/inertia-vue';
Vue.use(Plugin);

then in Console ...

Uncaught TypeError: Cannot read property 'install' of undefined