sohail49

Member Since 8 Months Ago

Experience Points
9,160
Total
Experience

840 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
76
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 2
9,160 XP
Apr
05
1 week ago
Activity icon

Replied to Livewire Array Key Value Pairs

@jlrdw

I trying To do This is Livewire but Its Not Working This Tutorial is For Laravel Have A look

https://laraveldaily.com/working-with-mysql-json-columns-in-laravel-custom-properties-example/

this is My code For for 5 Input i which i define the key and the value of the key but i don't know how to do that in livewire

@for ($i=0; $i <= 4; $i++)
	 <div class="row flex">
			<div class="col-md-2" style="margin-bottom: 2px;">
				 <input type="text" wire:key="content" class="form-control form-control-sm">
			</div>
			<div class="col-md-4">
				 <input type="text" wire:model="content.{{$i}}" class="form-control form-control-sm">
			</div>
	 </div>
@endfor
Apr
04
1 week ago
Activity icon

Replied to Livewire Array Key Value Pairs

@jlrdw how i dont know can you show me

Activity icon

Started a new Conversation Livewire Array Key Value Pairs

Hi Guys

Anyone Know To insert kay and Value to livewire array For Example

I have an array and I want to add some to the array this is the default behavior

array:3 [▼
  0 => "xl"
  1 => "red"
  2 => "100"
]

But I Want Some Thing Like This

array:3 [▼
  'size' => "xl"
  'color' => "red"
  'price' => "100"
]

and here is my Code

@for ($i=0; $i <= 4; $i++)
	 <div class="row flex">
			<div class="col-md-2" style="margin-bottom: 2px;">
				 <input type="text" wire:key="content" class="form-control form-control-sm">
			</div>
			<div class="col-md-4">
				 <input type="text" wire:model="content.{{$i}}" class="form-control form-control-sm">
			</div>
	 </div>
@endfor

and Live Wire Component

public $content = [];
return view('livewire.product');
				

I get the First Out with The Key 0 1 2 3 but What i want is Also To define The Keys

Activity icon

Started a new Conversation Tags Input In Livewire

Hi Guys

I want to Create A Tags Input in Livewire i use a jquery tag plugin but its not passing the data to live wire component can Here is the Plugins Link it work in laravel

https://www.jqueryscript.net/demo/Tagging-System-Autocomplete-Amsify-Suggestags/

Thanks In Advance

Mar
30
2 weeks ago
Activity icon

Started a new Conversation Livewire/Alpine Tags Input

Hi i am create a tags input and i am using alpine and livewire but the problem is i only get the value last tag and the the other tags

Tags Input

 <label for="sizes" class="block font-medium text-sm text-gray-700">Sizes</label>
<x-form.tags class="bg-grey-lighter" wire:model="tags"/>

Tags input Component

<div x-data="{tags: [], newTag: '' }" {{ $attributes }}>
	 <template x-for="tag in tags">
			<input type="hidden" :value="tag" name="tags">
	 </template>
	 
	 <div class="max-w-sm w-full ">
			<div class="tags-input">
				 <template x-for="tag in tags" :key="tag">
                <span class="tags-input-tag">
                    <span x-text="tag"></span>
                    <button type="button" class="tags-input-remove" @click="tags = tags.filter(i => i !== tag)">
                        &times;
                    </button>
                </span>
				 </template>
				 
				 <input class="tags-input-text border-gray-700 w-full" placeholder="Add tag..."
								@keydown.enter.prevent="if (newTag.trim() !== '') tags.push(newTag.trim()); newTag = ''"
								@keydown.backspace="if (newTag.trim() === '') tags.pop()"
								x-model="newTag"
				 >
			</div>
	 </div>
</div>

Tags Livewire Components

class Products extends Component
  {
    
    public $tags = [];

   
    
    public function render()
    {
   
      return view('livewire.product');
    }
  }
Mar
24
2 weeks ago
Activity icon

Started a new Conversation Create A Laravel Storage Link After Hosting A Site On The Internet

Hi I am Using Hostinger for web hosting and I hosted Laravel Siteon hostinger everything went smooth but i can create a storage link that give me this error

symlink(): No such file or directory

as For my File Structure Is it the Same as laravel but the Difference is instead of Public Folder i have Public_html folder that is the only difference all the folder are on the same level

Mar
22
3 weeks ago
Activity icon

Started a new Conversation Send Notification Through Livewire Components

hi I am Send a mail Notification to the user (if Someone like The Post of Comment On the Post ) and I have to Create the Like Button in livewire component

Like Blade Components

 <svg
			 class="w-7 h-7 mr-6 cursor-pointer stroke-2 {{ ($isLiked ? 'fill-current text-red-500' : 'stroke-current tex-black fill-none') }}"
			 wire:click="addLike({{ $post->id }})">
			<use xlink:href="{{ asset('storage/uploads/sprite.svg#heart-outline') }}"></use>
	 </svg>

#Method 1

Like Method in Livewire Component

 public function addLike($id)
    {
      $posts = Post::where('id', $id)->first();
      Auth::user()->toggleLike($posts);
      $this->isLiked = $posts->isLikedBy(Auth::user());
      $this->likeCount = count($posts->likers);
      
      if ($this->isLiked) {
        $user = User::with('posts')->where('id', $posts['user_id'])->first();
        $user->notify(new LikeNotification($user));
      }
      
    }

This method Work Fine But the Problem is first I send the notification and send the Feedback to the user that the post has Been Liked which is change the icon color now it takes 10 to 15 second to send the notification which mess up the interactivity of the app

#Method 2

Code

 protected $listeners = [
      'PostLiked' => 'PostLiked'
    ];
    
    public function PostLiked($posts)
    {
      
      $user = User::with('posts')->where('id', $posts['user_id'])->first();
      $user->notify(new LikeNotification($user));
      
      
    }

 public function addLike($id)
    {
      $posts = Post::where('id', $id)->first();
      Auth::user()->toggleLike($posts);
      $this->isLiked = $posts->isLikedBy(Auth::user());
      $this->likeCount = count($posts->likers);
      if ($this->isLiked) {
        $this->emit('PostLiked', $posts);
      }
    }

In this Method, The interactivity Work Fine The user gets the feedback immediately but i send 5 mail Instead Of 1 mail Which I dont Want

Mar
19
3 weeks ago
Activity icon

Started a new Conversation SQLSTATE[23000]: Integrity Constraint Violation: 1452 Cannot Add Or Update A Child Row

Hi I create a function so the user can save a post but some of the posts get to add to the database while some of them throw this error i don't know what happing

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`instagram`.`saveposts`, CONSTRAINT `saveposts_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE) (SQL: insert into `saveposts` (`created_at`, `post_id`, `updated_at`, `user_id`) values (2021-03-19 19:26:37, 1, 2021-03-19 19:26:37, 6))

Like is said some of the posts get to add and I can also retrieved but some throws them all the post are the same

here is the code

saveposts table

public function up()
    {
      Schema::create('saveposts', function (Blueprint $table) {
        $table->primary(['post_id', 'user_id']);
        $table->foreignId('post_id')->index()->constrained()->cascadeOnDelete();
        $table->foreignId('user_id')->index()->constrained()->cascadeOnDelete();
        $table->timestamps();
      });
    }

method for saving posts this is in the User Model

public function saveposts()
    {
      return $this->belongsToMany(Post::class, 'saveposts', 'post_id', 'user_id')->withTimestamps();
    }
    
    public function unsave(Post $post)
    {
      return $this->saveposts()->detach($post);
    }
        
    public function issaved(Post $post)
    {
      return $this->saveposts->contains($post);
    }
    
    public function saves(Post $post)
    {
      
      return $this->saveposts()->save($post);
    }

save button this is a livewire blade component

 @if($saved)
			
			<button wire:click="unsavepost({{ $post }})">
				Unsaved
			</button>
	 @else
			
		<button  wire:click="savepost({{ $post }})">
			saved
</button>
	 
	 @endif

livewire save components

 class Save extends Component
  {
    public $saved;
    public $post;
    
    public function mount($post)
    {
      $this->post = $post;
      $this->saved = Auth::user()->issaved($this->post);
      
    }
    
    public function savePost(Post $post)
    {
      
      Auth::user()->saves($post);
      $this->saved = Auth::user()->issaved($post);
      
      
    }
    
    public function unsavepost(Post $post)
    {
      
      Auth::user()->unsave($post);
      $this->saved = Auth::user()->issaved($post);
      
      
    }
    
    
    public function render()
    {
      return view('livewire.save');
    }
  }
Mar
18
3 weeks ago
Activity icon

Replied to SQLSTATE[42S22]: Column Not Found: 1054 Unknown Column 'savepostable_id' In 'field List'

@a4ashraf 1 yes i have run the migration 2 the field exists in the database 3 yes the is my table name

Activity icon

Started a new Conversation SQLSTATE[42S22]: Column Not Found: 1054 Unknown Column 'savepostable_id' In 'field List'

Hi guys I have a Polymorphic relationship between the post and save_posts table by I get this error

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'savepostable_id' in 'field list'

here is the save_posts table

   public function up()
    {
      Schema::create('save_posts', function (Blueprint $table) {
        $table->id();
        $table->foreignId('user_id')->index()->constrained()->cascadeOnDelete();
        $table->morphs('savepostable');
        $table->timestamps();
      });
    }

and here I am calling the relation in post model

 public function isSavedBy(User $user)
    {
      
      $this->saveposts()->save($user);
    }
    
    public function saveposts()
    {
      return $this->morphMany(savePost::class, 'savepostable');
    }
Activity icon

Awarded Best Reply on TypeError: Cannot Read Property 'fingerprint' Of Null

thnx I solved the issue by passing time in the key variable like this

<livewire:likes :post="$post" :key="time().$post->id"/>

now i don't know if its good or bad but i work

Activity icon

Replied to TypeError: Cannot Read Property 'fingerprint' Of Null

thnx I solved the issue by passing time in the key variable like this

<livewire:likes :post="$post" :key="time().$post->id"/>

now i don't know if its good or bad but i work

Mar
17
3 weeks ago
Activity icon

Started a new Conversation TypeError: Cannot Read Property 'fingerprint' Of Null

Hi

I am using livewire load more Function and also i am using overtrue/laravel-like package

when i add the like to the loadmore i dont not work give this error but if i remove then i work

The Error


index.js:32 Uncaught (in promise) TypeError: Cannot read property 'fingerprint' of null
    at new Component (index.js:32)
    at onNodeAdded (index.js:476)
    at callHook (morphdom.js:35)
    at handleNodeAdded (morphdom.js:140)
    at morphdom.js:363
    at morphEl (morphdom.js:219)
    at morphdom.js:332
    at morphEl (morphdom.js:219)
    at morphdom.js:332
    at morphEl (morphdom.js:219)

i provided the key to like system like this

 <livewire:likes :post="$post" :key="$post->id"/>
Activity icon

Replied to N+1 Problem In Laravel Livewire

by the way, the issue still occurs from the comment Compon ents

if i remove this query i goes away be so do the comment

'comments' => $this->post->comments()->with('user')->whereNull('comment_id')->paginate($this->commentsPerPage)
Activity icon

Replied to N+1 Problem In Laravel Livewire

Post Query

$ids =  Auth::user()->followings->pluck('id');
 $ids->push( Auth::user()->id);
 $posts= Post::with('user', 'comments', 'likers')->whereIn('user_id', $ids)->latest()->get();
return view('dashboard', [
        'posts' =>$posts
        'user' => Auth::user()
      ]);

this is how i am loading the post with the comment

@foreach ($posts as $post)
	 
	 <div class="relative border mb-16">
			<x-Post.Postheader :post="$post" class="border-t"/>
			<div class="pt-4 overflow-hidden">
				 <a href="{{ route('post.show' ,['post' => $post->id])  }}">
						<img src="{{ asset($post->image) }}" alt="{{ $post->name }}" class="w-full"></a>
			</div>
			<div class="comment section ml-4 overflow-x-hidden py-4">
				 <p class="pl-2 pr-4 pt-2 text-gray-800"
						x-data="{ShowMore : false , maxLength : 25 , Content : '' , Excrpt : ''}"
						x-init="Content = $el.firstElementChild.textContent.trim() ; Excrpt = Content.slice(0 , maxLength)">
				 <span x-text="ShowMore ? Content : Excrpt">
						{{ $post->description }}
				 </span>
						<button
								class="text-gray-500 ml-4"
								@click="ShowMore = !ShowMore"
								x-show="Content.length > maxLength"
								x-text="ShowMore ? 'Show less' : 'Show more'"
						></button>
				 </p>
				 
				 <livewire:comments :post="$post" :showlatest="true"/>
				 <x-Post.singlePost :post='$post'
														class="fixed top-0 left-0 w-screen h-screen bg-black bg-opacity-75 z-30"/>
			</div>
			<x-Post.Postfooter class="pb-12" :post="$post"/>
	 </div>
@endforeach
Activity icon

Replied to N+1 Problem In Laravel Livewire

ok that solve on of the problem now I am eager loading the user and replies and i have installed beyondcode/laravel-query-detector and i still say that i ran into n+1 problem this is the alert i get


Model: App\Models\Post => relation:
App\Models\Comment - you should add
"with('App\Models\Comment')" to eager load this relation

Model: App\Models\Post => relation:
App\Models\Comment - you should add
"with('App\Models\Comment')" to eager load this relation

this is the full alert 

Mar
16
4 weeks ago
Activity icon

Replied to N+1 Problem In Laravel Livewire

<div class="flex flex-col">
				 <div class="flex justify-between w-full absolute bottom-2 left-0 border-t px-2">
						
						<x-comments.inputfield/>
				 </div>
				 
				 @foreach($comments as $comment)
						
						
						<div class="display-comment" x-data="{showReply : 'close'}">
							 
							 <x-comments.commentprofileImage :user="$comment->user"/>
							 
							 <p>{{ $comment->body }}</p>
							 <p class="inline-block text-xs font-semibold text-gray-700">{{ substr($comment->created_at->diffForHumans() , 0 , 4) }}</p>
							 
							 {{--							 <x-comments.commentReplyButton :comment="$comment"/>--}}
							 <x-comments.commentshowReply :comment="$comment"/>
							 
							 
							 @foreach ($replies as $reply)
									@if ($comment->id === $reply->comment_id)
										 <div class='ml-12 mt-2' x-show="showReply === 'showreply-{{$reply->comment_id}}'">
												<x-comments.commentprofileImage :user="$reply->user"/>
												<p>
													 <a href="{{ route('profile' , ['user' => $comment->user->name]) }}"
															class="text-blue-500">{{ $reply->name .' ' }}</a>
													 {{ $reply->body }}
												</p>
												<p class="inline-block text-xs font-semibold text-gray-700">{{ substr($comment->created_at->diffForHumans() , 0 , 4) }}</p>
												<x-comments.replyButton :reply="$reply" :comment="$comment"/>
										 </div>
									@endif
							 @endforeach
						</div>
				 @endforeach
				 
				 @if($post->comments->count() >  $comments->perPage())
						<button class="flex justify-center mr-10 mt-4" wire:click="$emit('loadMoreComments')">
							 <svg class="w-6 h-6 cursor-pointer">
									<use xlink:href="{{ asset('storage/uploads/sprite.svg#plus-circle') }}"></use>
							 </svg>
						</button>
				 @endif
			</div>```
Here it is i is long that why i did not paste it but the is all the code for comment section
Mar
15
4 weeks ago
Activity icon

Started a new Conversation N+1 Problem In Laravel Livewire

hi

I create the comment section and everything work fine but I have an n+1 problem and I quit don't know how to solve it I have Debug the application to check where the problem here What Happen

I am Creating an App like Instagram

First I load the post of the user and The one he follows In for each loop Here is the Query

 $ids =  Auth::user()->followings->pluck('id');
 $ids->push( Auth::user()->id);
 $posts= Post::with('user', 'comments', 'likers')->whereIn('user_id', $ids)->latest()->get();
return view('dashboard', [
        'posts' =>$posts
        'user' => Auth::user()
      ]);

For Each loop I have Strip the Unnesserry Code


@foreach($posts as $post)

	<livewire:comments :post="$post" />
@endforeach

So for Everything Work, Fine Here Occurs The Problem

Livewire Comment Component

public function mount($post)
    {
      $this->post = $post;
	}


This is the Method The Work Fine But I Want Pagination

public function render()
    {
      return view('livewire.comments', ['comments' => $this->post->comments]);
    }

and If I use The pagination I Ran Into n+1 Problem 
public function render()
    {
      return view('livewire.comments', ['comments' => $this->post->comments()->paginate(5)]);
    }




if You have Any Question I if you need I extra Information Just Tell Me ok

best Regards

Mar
08
1 month ago
Activity icon

Replied to Comment System In Livewire

hi i remove the reply table and use the polymorphic relationship and I work Fine Now But Thanks Any way

Mar
06
1 month ago
Activity icon

Started a new Conversation Comment System In Livewire

Hi guy I create a Comment System In Live wire It works Fine When I add the Comment but when I add a reply to the comment I add the Reply to the Database but also Throw This error when i refresh the page the error is gone and the reply is added

here is the error

foreach() argument must be of type array|object, null given (View: /media/sohail/devOps/backend/instagram/resources/views/livewire/comments.blade.php)

Here My Code Comment.php it livewire component

class Comments extends Component
  {
    
    public $body;
    public $reply;
    public $post;
    public $comments = [];
    
    public function mount($id)
    {
      $this->post = Post::find($id);
      $this->comments = $this->post->comments;
      
    }
    
    public function addComment()
    {
      $this->validate([
        'body' => 'required'
      ]);
      $newComment = Comment::create([
        'user_id' => Auth::user()->id,
        'post_id' => $this->post->id,
        'body' => $this->body
      ]);
      
      $this->comments->push($newComment);
      $this->body = '';
    }
    
    public function addReply($id)
    {
      $this->validate([
        'reply' => 'required'
      ]);
      
      $newComment = Reply::create([
        'comment_id' => $id,
        'body' => $this->reply
      ]);
      $this->comments->push($newComment);
      $this->reply = '';
    }
    
    public function render()
    {
      
      
      return view('livewire.comments');
    }
  }

Here is the Blade The Comment

	 {{--   Input Field For the Comment --}}
	 <div class="flex">
			<x-jet-input id="comment"  type="text" name="comment"  
				wire:model="body" wire:keydown.enter="addComment()"/>
			<x-jet-input-error for="body"/>
			<x-jet-button wire:click="addComment()">Add</x-jet-button>
	 </div>
	 {{--Input End--}}
	 
	 @foreach ($comments as $comment)
			{{--Comment body--}}
			<p>{{ $comment->body }}</p>
	 		{{-- Reply button model--}}
			<div x-data="{ isOpen : ''}">
				 {{--Reply Button--}}
				 <button class="text-blue-500" 
				@click="isOpen = 'reply-{{ $comment->id }}'">Reply
				</button>
				 {{--Input Model For Reply--}}
				 <div x-show="isOpen === 'reply-{{ $comment->id }}'">
						<input type="text" name="reply" wire:model="reply" 
                           wire:keydown.enter="addReply({{$comment->id}})">
						<x-jet-input-error for="reply"/>
				 
				 </div>
			</div>
	 				{{--Reply foreach Loop--}}
			<div class="ml-8">
				 @foreach ($comment->reply as $reply )
						{{--Reply body--}}
						<p>{{ $reply->body }}</p>
						{{--Reply Button For Reply--}}
						<div x-data="{ isOpen : ''}">
							 <button 
								@click="isOpen = 'reply-{{ $comment->id }}'"> 
								Reply
							</button>
							 <div 
								x-show="isOpen === 'reply-{{ $comment->id }}'">
									{{--Input For Reply reply-}}
									<input id='title' type="text" 
wire:model="reply"
							 wire:keydown.enter="addReply({{$comment->id}})" >
									<x-jet-input-error for="title"/>
							 </div>
						</div>
				 
				 @endforeach
			</div>
	 @endforeach
Mar
05
1 month ago
Activity icon

Replied to Livewire Do Not Show The Data With Out The Page Reload

did not work still required the reload

Activity icon

Replied to Livewire Do Not Show The Data With Out The Page Reload

i am not that good in livewire can you tell me how

Activity icon

Started a new Conversation Livewire Do Not Show The Data With Out The Page Reload

Hi I am making a Comment System In Livewire but the Thing is When i Insert a Comment I don't show Unless I reload the Page

I am using Livewire Full-Page Components here is the Code

The route

   Route::get('/livePost/{id}/show', Comments::class)->name('livewire.post');

The Component Code

class Comments extends Component
  {
    
    public $comments;
    public $body;
    public $post;
    
    public function mount($id)
    {
      $this->post = Post::find($id);
      $this->comments = $this->post->comments;
      
    }
    
    public function addComment()
    {
      $this->validate([
        'body' => 'required'
      ]);
      Comment::create([
        'user_id' => Auth::user()->id,
        'post_id' => $this->post->id,
        'body' => $this->body
      ]);
      $this->body = '';
    }
    
    public function render()
    {
      
      return view('livewire.comments');
    }
  }

and The Livewire Blade component

	 <div class="flex">
			<x-jet-input id="comment" class="block mt-1 w-full mr-6" type="text" name="comment" 	 
            :value="old('comment')"  required autofocus autocomplete="comment" wire:model="body" 
            wire:keydown.enter="addComment()"/>
			<x-jet-input-error for="body"/>
			<x-jet-button wire:click="addComment()">Add</x-jet-button>
	 </div>
	 @foreach ($comments as $comment)
			<p>{{ $comment->body }}</p>
	 @endforeach
</div>

Thanks In Advance

Mar
04
1 month ago
Activity icon

Started a new Conversation How To Add A Field To Laravel 8 Update Profile Section

Hi

I added Some new Field To the Laravel 8 Profile Section now The Problem is I don't get the Data Passed Into the Input Field In The UpdateProfileinformation Controller

here is my code its in the Update-profile-information-form.blade.php

	<div class="col-span-6 sm:col-span-4">
				 <x-jet-label for="website" value="{{ __('Website') }}"/>
				 <x-jet-input id="website" name='website' type="text" class="mt-1 block w-full"
											value="{{ $this->user->profile->website }}"
											autocomplete="website"/>
				 <x-jet-input-error for="website" class="mt-2"/>
			</div>
			
			{{--Gender--}}
			
			<div class="col-span-6 sm:col-span-4">
				 <x-jet-label for="gender" value="{{ __('Select Gender') }}"/>
				 <select name="gender" class="mt-1 block w-full rounded border-gray-300" id="gender">
						<option value="">Select Your Gender</option>
						<option value="male" {{ $this->user->profile->gender === 'male' ? 'selected' : '' }}>Male</option>
						<option value="female" {{ $this->user->profile->gender === 'female' ? 'selected' : '' }}>Female</option>
						<option
								value="prefer not to say" {{ $this->user->profile->gender === 'prefer not to say' ? 'selected' : '' }}>
							 Prefer Not
							 to Say
						</option>
				 </select>
				 <x-jet-input-error for="gender" class="mt-2"/>
			</div>
			
			{{--Bio--}}
			
			<div class="col-span-6 sm:col-span-4">
				 <x-jet-label for="bio" value="{{ __('Bio') }}"/>
				 <textarea
						 class='mt-1 block w-full rounded border-gray-300'
						 name="bio"
						 id="bio"
						 cols="30"
						 rows="10"
						 spellcheck="true"
				 >{{ $this->user->profile->bio }}</textarea>
				 <x-jet-input-error for="bio" class="mt-2"/>
			</div>

these are the 3 new Field I have Add By i only received the data from the Default field of The Form

Mar
03
1 month ago
Activity icon

Started a new Conversation Wordpress Location Input

hi Guys

Does anyone Know to add And Location Input field To the WordPress site

For Example

We have a normal input file and when you click on it a model open with the map and where you can select your location and the value will be placed in the input field

If its not Do able in Wordpres What About HTML/javascript

Feb
17
1 month ago
Activity icon

Started a new Conversation Scroll Effect

Hi

Can Anyone tell me how to achieve the scroll effect?

take a look at - https://www.littleminx.tv

Scroll down a couple of times to see that the arrow is always stay at the bottom of the page

that one arrow is linked to multiple section

Feb
15
1 month ago
Activity icon

Started a new Conversation Background Video Popup

Hi guys does Any know how to create This Kind Of video Model in laravel

https://www.littleminx.tv/child

check the link and you will see A short video plays in the background(no sound) with a heading over the video and then clicking the heading triggers a full-screen video with sound. Users can close the video in the top right-hand corner.

Activity icon

Replied to Laravel Valet

@fylzero i try it and it still did not work

Activity icon

Started a new Conversation Laravel Valet

Hi guys i have Install Laravel Valet And when i ran

valet secure mysite
Restarting php8.0-fpm...
Restarting nginx...
The [mysite.test] site has been secured with a fresh TLS certificate.

when I check its not secure in the browser so I ran

valet secured mysite

it say

mysite is not secured
Feb
14
1 month ago
Activity icon

Replied to Too Few Arguments To Function Illuminate\Support\Str::replaceFirst(), 2 Passed In E:\xampp\htdocs\Forex\vendor\livewire\livewire\src\helpers.php On Line 12 And Exactly 3 Expected

i code i give you was the default code the come with livewire so nothing changed

but I take a look and the @jlrdw link and give this a try

php artisan livewire:publish --config
php artisan config:cache
Activity icon

Replied to Laravel 8 Jetstream

thanks and how can i create my own x-jet-component

Activity icon

Replied to Too Few Arguments To Function Illuminate\Support\Str::replaceFirst(), 2 Passed In E:\xampp\htdocs\Forex\vendor\livewire\livewire\src\helpers.php On Line 12 And Exactly 3 Expected

go to the file helper.php which is in

E:\xampp\htdocs\Forex\vendor\livewire\livewire\src\

and The delete all your code and Paste This although backup your code just in case

<?php

namespace Livewire;

use Illuminate\Support\Str;

if (! function_exists('Livewire\str')) {
    function str($string = null)
    {
        if (is_null($string)) return new class {
            public function __call($method, $params) {
                return Str::$method(...$params);
            }
        };

        return Str::of($string);
    }
}

Activity icon

Started a new Conversation Laravel 8 Jetstream

Hi So I install laravel 8 with jetstream and livewire and if i customize laravel jet-stream component will they revert back to the original if I update laravel

NOTE: I have Publish My component to the resources Directory

And Second How can I add Laravel Jetstream Component