dipherent

Member Since 2 Years Ago

Experience Points
21,430
Total
Experience

3,570 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
192
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 5
21,430 XP
May
04
4 days ago
Activity icon

Replied to Laravel Nova Filter Viewable By Admins Only

if any one is passing by here wondering how to do this, here is how:

  if ($request->user()->isAdmin()) {
            return [
            
            
                new ByCompany,
                new DateFromFilter,
                new DateToFilter,
            ];
        }

        return [
              new ByCategory,
        ];

Activity icon

Replied to Can I Chain Two Ability Methods On A User Model?

I tried this and it worked, but I don't know if this is a good approach:

return $request->user()->isAdmin() || $request->user()->isEditor() ;

Activity icon

Started a new Conversation Can I Chain Two Ability Methods On A User Model?

Hello friends,

I have a question:

I have this in my code:

return $request->user()->isAdmin();

isAdmin is defined in my user model and I can call it as above, but I also have another method: isEditor() ,

How do you call two methods at the same time on user()?

I know I can do another method that returns true for both and then call that single methods, but I was wondering if this is posisble.

Thanks for your help

May
01
1 week ago
Activity icon

Replied to Blade Component Render In View Causes "syntax Error, Unexpected 'endif' (T_ENDIF), Expecting End Of File"

For those still having a problem with this... Here is a solution I found for this:

in your app layout use:

<title>{{ $title ?? config('app.name', 'Laravel') }}</title>

and on your pages:

<x-slot name="title">Our new page title</x-slot>

source:

https://joshhanley.com.au/articles/how-to-structure-your-layout-file-for-livewire

Apr
30
1 week ago
Activity icon

Started a new Conversation How To Show The Link Of Uploaded Image Or File In Nova?

HI friends,

I need your help again please.

I am using the Image field in Nova to upload an image. I want to also show the url to the uploaded image on the details page for the resources.


Image::make('Listing Image')->disk('public')
            ->path('listingimages')
            ->storeAs(function (Request $request) {
                return $request->listing_image->getClientOriginalName();
            }),

            Text::make(__('Name'), 'name')->sortable()->rules('required'),

I want to be able to see the url of the uploaded image and copy it if needed. I know I can just do right click and copy the image address, but is there a way to display the url ??

Thanks a lot,

Activity icon

Replied to How To Link To The Public (frontend) View For A Nova Resource?

@amaury Thanks a lot buddy, I used your solution in combination with the Link field and did this:


Link::make('Public Link', 'listing')
                ->url(function () {
                    if($this->list){
                        return route('listings.show', $this->id);
                    }
                })->hideWhenCreating()->hideWhenUpdating()
                ->text('Check Public View')
                ->icon()
                ->blank(),

Thanks again for your help. Highly appreciated.

Activity icon

Replied to How To Symbol Link The Vendor And Public Folders?

Thank you so much @automica ... It worked nicely.

Activity icon

Started a new Conversation How To Symbol Link The Vendor And Public Folders?

Hi friends,

I installed CKEditor to my Laravel project and I am following some instructions from a package I used. The instruction says:

symbolic link the "vendor/ckeditor/ckeditor" to "public/js/ckeditor".

I am not sure how to do this in Laravel

I really appreciate your help here,

Thanks

Apr
26
1 week ago
Activity icon

Replied to How To Link To The Public (frontend) View For A Nova Resource?

Hi @amaury Thanks for your answer, but how do I enter the link in the callback above ... the link I use in blade is:

{{route('listing.show', $listing)}}

How would I fit it in? Please pardon me I am a beginner,

Thanks

Apr
21
2 weeks ago
Activity icon

Started a new Conversation How To Link To The Public (frontend) View For A Nova Resource?

Hi friends,

I am using Nova for the admin side of my project, and I am creating listings in the admin using Nova and they are rendered in blade and are listed on the front page of the website.

In my admin, I want to be able to click on the listing and view the public(frontend) listing page. For now, when I click on it, it gives me the "show" page inside Nova.

I feel silly to ask this question because I feel the answer should be easy and I am missing something,

Thanks for your help,

Apr
19
2 weeks ago
Activity icon

Replied to How Do I Check If Email Is In DB And Re-send Confirmation Link?

Thanks for all the help @snapey ... I will do this and as you suggested, I will deal with anything else when becomes an issue.

Apr
18
2 weeks ago
Activity icon

Replied to How Do I Check If Email Is In DB And Re-send Confirmation Link?

I tried this and things went smoothly, thanks @snapey , but I was thinking, what If accumulate a lot of duplicate emails in my db over a long time. Wouldn't that be bad?

I am not using a newsletter software to send my emails, like mailchimp...etc; I am using mailgun api to send all emails from my code automatically every morning.

So, if I have lot of duplicates, I have two problems:

1- I will be sending the same user two emails everyday 2- Mailgun (or any other services) will charge me money for that. I have seen my bills skyrocket with them for emails I didnt' need to send in the past. So, I am trying to keep the email list as clean as possible this time.

Is there any other way to keep the unique check and do the trick some other way?

Thanks

Activity icon

Replied to How Do I Check If Email Is In DB And Re-send Confirmation Link?

I will try that and get back to you with my findings right away... this is a great suggestion of removing the unique validation.

Activity icon

Started a new Conversation How Do I Check If Email Is In DB And Re-send Confirmation Link?

Hi friends,

I have a situation here. When users sign up for my newsletter I send them a confirmation email to confirm their subscription.

If for example they did not get the confirmation email, and they entered the email again in the form, they will get a message saying they are already in the list but they need to confirm.

I want to be able to show a -resend confirmation link- or even just try to send the confirmation link again if they enter their email a second time.

Here is my function in the controller:

public function subscribe(Request $request)
    {
        
        request()->validate([
            'email'=>'required|email|max:255');

        $validator = Validator::make($request->all(), ['email' => 'required|email|max:255|unique:newsletter']);

        if ($validator->fails()) {
            
            return redirect()->back()->with('failure', 'This email is already added, please check your email for confirmation link');
        }
        $email = $request->input('email');
        $subscriber = new Newsletter();
        $subscriber->email = $email;
        $subscriber->token = bin2hex(random_bytes(75));
       
        $message = $subscriber->save() ? 'You have successfully subscribed.' : 'Something went wrong, please try again.';

 

            //this will send an email confirmation to user
            Mail::to($request->email)->send(new ConfirmNewsletterSubscription($subscriber));
           
    
       return redirect()->back()->with('pending', 'Pending. Please check your inbox and click the confirmation link we just sent.');

    }

All I want now is to check if they email is already in the database and the "email_verified" column is 0, if so, I want the controller to send the confirmation email again.

Is there a way I can do it here or should I direct them to a resend form again and assign a new token...etc

How do I do the check anyway?

Thanks

Apr
14
3 weeks ago
Activity icon

Replied to How To Show Random Client Logos In Laravel

@corvs I am embarrassed to say this after my previous reply. I went back to my db after you noted that I might have two clients with same logo, and guess what, you were right. I had a client using same logo as another one... and that was the whole issue...

Many thanks for your note, I could never suspect that because I created them manually.

Thanks again

Activity icon

Replied to How To Show Random Client Logos In Laravel

No, I created them manually, and I am sure they are the same client. All the clients I am testing this with are unique, and as you may guess, I assumed that when I used inRandomOrder I would only get the unique ones each time... I am thinking that inRandomOrder only randomize the order, not the values... right?

Activity icon

Replied to How To Show Random Client Logos In Laravel

@corvs I have many, like 300...I am testing this only on a set of 20.... Maybe when I add the 300 things will be different.

For now when I refresh, I sometime get the same image showing twice on the same page.

Is there a way to make sure logos won't show up twice on the same page? I tried the distinct and unique method and that didn't work.

I am a beginner so please pardon my questions, thanks for your help

Activity icon

Started a new Conversation How To Show Random Client Logos In Laravel

Hi friends,

In my website footer I have a list of client logos I am pulling from the Client table. I want to be able to show 4 logos but randomly. So whenever a user refresh the page they will see random logos.

I tried this:

        $clients = Client::inRandomOrder()->take(4)->get();

but this sometimes get the same logo twice ..

How can I do this and get unique random logos ..

Thanks for kind help ... highly appreciated.

Apr
10
4 weeks ago
Activity icon

Replied to How To Show Other Jobs From Same Company On The Current Job Page?

I will read about it for sure. I appreciate the help @neilstee , this saved me all night :)

Activity icon

Replied to How To Show Other Jobs From Same Company On The Current Job Page?

This was a great help. I didn't know I could use the where clause in blade... many thanks for teaching me this.

Activity icon

Started a new Conversation How To Show Other Jobs From Same Company On The Current Job Page?

Hi friends,

I am trying to list 5 job postings from the same company on each job details page, but i don't want the current job (same job being viewed) to be in the list. For example, CompanyX has 3 job postings (Admin Assistant, Accountant, Manager), when users visits the "Admin Assistant" detail page, I want them to see the other two jobs from the company (up to 5 jobs max.); but the current job -admin assistant- should not be in that list because the user is already viewing it.

What I have so far is:

@foreach ($job->company->jobs->slice(0, 5)  as $job)
                         
                            <span>{{ $job->title }}</span>

                         
@endforeach

I am trying to do this at the blade level, but I am open to any other help I can get from you.

Many thanks in advance,

Activity icon

Replied to How To Style The Font Differently If It Is In Arabic Language?

@rodrigo.pedra THANK YOU VERY MUCH. This is great. I searched google I got many suggestions but this one I never saw... maybe different results based on country.

Anyway, I really appreciate it. Here is how I solved it for now:


<h2 class="text-2xl font-bold"  
                
                @if (preg_match('/\p{Arabic}/u', $post->title)) style="font-family: 'Tajawal';"
                @endif>

    {{ $job->title }}

</h2>

But honestly, your answers looks more solid. I will try it. Thanks again

Activity icon

Started a new Conversation How To Style The Font Differently If It Is In Arabic Language?

Hi friends,

I have been at this for the past two hours with no results.

I have a form that users fill. They have the option to fill it in English or Arabic... The view renders the results with Arial Font, which is fine for the English output, but the Arabic text looks ugly.

How do I detect the Arabic text and make a conditional to change the output font family if it is in Arabic?

PLEEEEEEASE HELP,

Thanks

Mar
26
1 month ago
Activity icon

Replied to How To Calculate And Render Percentages In Laravel

Thanks guys, I will explore these suggestions today and see where I get

Mar
25
1 month ago
Activity icon

Replied to How To Calculate And Render Percentages In Laravel

I am learning Laravel, and this is not a real project.. the purpose of this is to track the weight in a weight loss program..

Starting model is the initial measurements and the Progress Model is the updated measurements that the user will be updating from time to time,

I admit, the naming here is confusing and I know names should be better suited for real applications..

Thanks

Activity icon

Started a new Conversation How To Calculate And Render Percentages In Laravel

Hi friends,

I am building an applications where I have to enter a number and then update this number after a while. I want to be able to show the percentage change in both numbers and render it in blade.

here is what I have in my blade file:

<p> starting weight </p>

<span>{{auth()->user()->starting->weight}} kg </span>

<p> new weight </p>

<span>{{auth()->user()->progress->weight}} kg </span>

<p> Percentage change: </p>

<span>? % </span>


I am entering these in the forms and I have controllers for Progress and Starting, they also have a relationship with the user.

Any ideas how I can do this easily?

Thanks

Mar
09
1 month ago
Activity icon

Awarded Best Reply on How To Change Value In Database Via Email Link?

Solved, here is how for those who might need this in the future:

@component('mail::button', ['url' => route('subscribe.jobs.confirm', ['token' => $subscriber->token])])
Button Text
@endcomponent
Activity icon

Replied to How To Change Value In Database Via Email Link?

Solved, here is how for those who might need this in the future:

@component('mail::button', ['url' => route('subscribe.jobs.confirm', ['token' => $subscriber->token])])
Button Text
@endcomponent
Activity icon

Replied to How To Change Value In Database Via Email Link?

I solved that like this:

public function confirmSubscribe($token)
    {
        $email = JobAlert::where('token', $token)->value('email');
        
        $subscriber = JobAlert::where('token', $token)->first();
        $subscriber->email_verified = 1;
        $subscriber->save();
        
        return view('job.subscriptionConfirmed', compact('email', 'token'));
    }

But one question remains:

how do I pass the token to the link that will be sent to the user?

thanks

Activity icon

Started a new Conversation How To Change Value In Database Via Email Link?

Hello friends, I am posting this as a new thread as I couldn't find an answer yet.

I am asking user to subscribe to my Alerts, once they enter their email address I send them an email to confirm the email address. I have a boolean column in my table called "email_verified". I want to the user to click a link in the email confirmation and alter this value to true. How do I do that?

Here is my full code:

Routes:

Route::post('subscribe/jobs', [JobAlertsController::class, 'subscribe'])->name('subscribe.jobs.emails');
Route::get('subscribe/confirmed/{id}', [JobAlertsController::class, 'confirmSubscribe'])->name('subscribe.jobs.confirm');
Route::get('unsubscribe/jobs/{token}', [JobAlertsController::class, 'getUnsubscribe'])->name('unsubscribe.jobs.get');
Route::post('unsubscribe/jobs', [JobAlertsController::class, 'postUnsubscribe'])->name('unsubscribe.jobs.post');


Controller:


class JobAlertsController extends Controller
{
    public function subscribe(Request $request)
    {
        $validator = Validator::make($request->all(), ['email' => 'required|email|max:255|unique:job_alerts']);

        if ($validator->fails()) {
            return redirect('/')->with('failure', 'Sorry, this email is already subscribed');
        }
        $email = $request->input('email');
        $subscriber = new JobAlert();
        $subscriber->email = $email;
        $subscriber->token = bin2hex(random_bytes(75));
        $message = $subscriber->save() ? 'You have successfully subscribed.' : 'Something went wrong, please try again.';

    

            //this will send an email confirmation to user
            Mail::to($request->email)->send(new ConfirmEmailAlert($subscriber));

    
       return redirect('/')->with('success', 'Thanks, your email has been added');

    }

    public function confirmSubscribe($id)
    {
        $email = JobAlert::value('email');
        $subscriber = JobAlert::findOrFail($id);
        $subscriber->email_verified->true;
        $subscriber->save();
        return view('job.subscriptionConfirmed', compact('email'));
    }

    public function getUnsubscribe($token)
    {
        $email = JobAlert::where('token', $token)->value('email');
        return view('job.unsubscribe', compact('email', 'token'));
    }

    public function postUnsubscribe(Request $request)
    {
        $email = $request->input('email', false);
        $token = $request->input('token', false);

        if (!$token) return abort(404);

        $subscriber = JobAlert::where('email', $email)->where('token', $token)->first();
        $message = $subscriber->delete() ? "You are no longer subscribed to TechDev Job Alerts" : "Unsubscription Failed";
        return redirect('/')->with('message', $message);
    }
}

What I need is to know what to pass into the "confirmSubscribe" function, and whether my route for that is correct or not. I get a 404 when trying the above code.

Please help Thanks

Activity icon

Replied to Email Alerts Subscribers: How To Verify Email In Laravel?

@jlrdw

I have been trying to fix this but apparently I need some help. I highly appreciate if you can guide me. Here is what I did so far:

1- I have added a new field to my email list table. new column is "email_verified" .. this is a boolean.

2- I created a mailable with all its parts...etc, and in the Controller of the alerts, I added this:

Mail::to($request->email)->send(new ConfirmEmailAlert($subscriber));

When the user fills in the email, they are added to my table, and they receive the confirmation email to their inbox. I tested that everything is fine.

Now, I want to add a link in that Confirmation email being sent so that when the user clicks it, the column "email_verified" changes to true.

I know I need to add another function to the controller that returns a view with the words "Confirmed...etc", but how do I change the column value within this function? I am confused of what to pass...etc

Here is the code:


class JobAlertsController extends Controller
{
    public function subscribe(Request $request)
    {
        $validator = Validator::make($request->all(), ['email' => 'required|email|max:255|unique:job_alerts']);

        if ($validator->fails()) {
            return redirect('/')->with('failure', 'Sorry, this email is already subscribed');
        }
        $email = $request->input('email');
        $subscriber = new JobAlert();
        $subscriber->email = $email;
        $subscriber->token = bin2hex(random_bytes(75));
        $message = $subscriber->save() ? 'You have successfully subscribed.' : 'Something went wrong, please try again.';

       

            //this will send an email confirmation to user
            	Mail::to($request->email)->send(new ConfirmEmailAlert($subscriber));
    
       return redirect('/')->with('pending', 'Thanks, please check your inbox to confirm subscription');

    }

    public function confirmSubscribe()
    {
        
        return view('subscriptionConfirmed');
    }

Thanks a lot in advance

Mar
08
2 months ago
Activity icon

Started a new Conversation Email Alerts Subscribers: How To Verify Email In Laravel?

Hi friends,

I have a simple form for my users to enter their email for some alerts. Once they enter the email address, it is added directly to my database. I am not happy with just adding them without verification that they are ligit.

How do I achieve the following:

Visitor enters the email and click subscribe -> They a success message that they have beed added but need to click on a verification link in their emails ->After the click on that link ->Add to database.

Sorry, I am a beginner in Laravel and I highly appreciate any help even if its just pointers or tips..

Thanks

Feb
21
2 months ago
Activity icon

Replied to How To Get Count Of Listings Without A Foreach

@michaloravec

$tagJobs = Tag::withCount(['jobs' => function (Builder $query) {
            $query->where('active', 1);
        }])->get();

Activity icon

Replied to How To Get Count Of Listings Without A Foreach

Thanks @michaloravec I used your link to help with the solution but got stuck at the tags part. Please see my reply above, I hope you can help too.

Thank you

Activity icon

Replied to How To Get Count Of Listings Without A Foreach

@snapey

Hi @snapey thanks for that .. It worked perfectly with the category but I used the job count as follows:

{{$totalJobs->where('category_id','22')->count()}}

How do I do this for the tags for example. There is no tag id in the job table but there is a pivot table job_tag. I tried the above in many forms and no results.

Here is the status:

I created a new eloquent query as follows:

{{$tagJobs[0]->jobs_count}}

But when I use the where clause with the above and remove the index everything breaks. I cannot use the above because I don't know the exact index of the tag because they change when I add new ones.

tagJobs give me this when I remove the jobs_count:

      [{"id":1,"name":"Java","created_at":"2021-01-27T17:13:49.000000Z","updated_at":"2021-01-27T17:13:49.000000Z","style":"gray","slug":"java","jobs_count":34}]

What I want to show is that '34' value... the jobs_count... how do I pull that from a collection instant and show it in blade?

Many thanks for your help

Feb
20
2 months ago
Activity icon

Started a new Conversation How To Get Count Of Listings Without A Foreach

Hi friends,

I have several categories for jobs (e.g. management, logistics...etc). When I want to loop over them on my page I use the following:

    @foreach ($categories as $category)
			
		<div class="flow-root">
              <a href="{{route('category.index', [$category->id, $category->slug])}}">
                {{$category->name}} <span>({{$category->active_jobs}})</span>
              </a>
            </div>
	@endforeach

The span with active_jobs shows the count normally.

Everything works fine with the above.

Now, I want to display 4 featured categories (hand-picked by me) and show them on the homepage header. I can write that manually without a loop in blade, I mean I can link the categories directly, but I want to show the number of jobs in front of each of these categories. How do I achieve that.

I know this may sound like a dumb question, but I cannot see the answer yet.

Please help.

Thanks

Feb
16
2 months ago
Activity icon

Replied to Livewire Not Updating Database As Expected

Man, you saved my day. I feel silly that I didn't even pay attention to that.

That was the problem and it is all fixed now.

THANK YOU VERY MUCH

Activity icon

Started a new Conversation Livewire Not Updating Database As Expected

Hi friends,

I am trying to update the User table with new values using a livewire components and controller. Everything seem to be OK, but when I check the db nothing is updating. Here is the code

<?php

namespace App\Http\Livewire;

use Livewire\Component;

class Profile extends Component
{
    public $username = '';
    public $jobTitle = '';


    public function save()
    {
        $this->validate([
            'username' => 'max:24',
            'jobTitle' => 'max:140',
        ]);

        auth()->user()->update([
            'username' => $this->username,
            'jobTitle' => $this->jobTitle,
        ]);

    }

    public function render()
    {
        return view('livewire.profile')
        ->extends('layouts.app');
    }
}


Here is the form in the component


<div>
    <form wire:submit.prevent="save">
            <input wire:model="username" id="username" class="flex-1 form-input block w-full rounded-none rounded-r-md transition duration-150 ease-in-out sm:text-sm sm:leading-5" />
            <input wire:model="jobTitle" id="jobTitle" rows="3" class="form-textarea block w-full transition duration-150 ease-in-out sm:text-sm sm:leading-5"/>
            <button type="submit" class="inline-flex justify-center py-2 px-4 border border-transparent text-sm leading-5 font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-500 focus:outline-none focus:border-indigo-700 focus:shadow-outline-indigo active:bg-indigo-700 transition duration-150 ease-in-out">
             Save 
            </button>  
    </form>
</div>

Initially you create a user with an email and password and then log in to you profile where you can update these two fields (username and job title).. everything works fine until I try to update those fields... things on the front end seem to be working but when I check the db table those two values are not saved.

Please help,

Thanks

Feb
10
2 months ago
Activity icon

Replied to Email Alerts - How To Confirm/verify Email?

Thank you all. The way @snapey suggested is what fits my scenario perfectly. I will give it a shot tonight.

Thank you @jlrdw and @lemmon

Feb
09
2 months ago
Activity icon

Started a new Conversation Email Alerts - How To Confirm/verify Email?

Hello friends,

I have created a form to get my visitors to fill in their emails if they want to receive daily alerts from the website. The form accepts the email and adds it to the database right away.

I want to be able to ask the visitors to confirm their email by clicking a verification link sent to them. How do I do that?

By the way, there is no registration system or user auth or anything.

Many thanks for your kind help and support,

This is my form:

<form action="{{route('subscribe.jobs.emails')}}" method="POST" class="sm:flex">
      @csrf
        <label for="email" class="sr-only">Email address</label>
        <input id="email" name="email" type="email" autocomplete="email" required class="w-full px-5 py-3 border border-transparent placeholder-gray-500 focus:ring-2 focus:ring-offset-2 focus:ring-offset-red-800 focus:ring-white focus:border-white sm:max-w-xs rounded-md" placeholder="Enter your email">
        
        <div class="hidden">
          <label for="iagree" >Phone</label>
          <input type="checkbox" name="iagree" id="iagree" />
        </div>
        
        <div class="mt-3 rounded-md shadow sm:mt-0 sm:ml-3 sm:flex-shrink-0">
          <button type="submit" class="w-full flex items-center justify-center px-5 py-3 border border-transparent text-base font-medium rounded-md text-white bg-red-500 hover:bg-red-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-red-800 focus:ring-red-500">
            Subscribe to alerts
          </button>

        </div>
      </form>
Feb
08
3 months ago
Activity icon

Replied to How To Insert Another Page Contents Into A Modal In Tailwind

Thanks... it worked perfectly. I noticed some slowness in the website, but I am still investigating.. and I wonder if this is the reason...

Anyway, here is how i did it for those who want to do the same:

Inside the modal I used this:

 <iframe class="w-full bg-white" src="{{route('job.show', $job->id)}}" frameborder="0"></iframe>

Feb
07
3 months ago
Activity icon

Started a new Conversation How To Insert Another Page Contents Into A Modal In Tailwind

Hi friends,

I am using laravel and tailwind to build a page that has a button to a Modal. I want to show another local page contents inside the modal, how do I do that?

I don't want to put the contents inside the modal directly. The reason I am trying to do this is because the page I am trying to use in the modal uses a different layout template with different meta tags...etc

I appreciate the help,

Thanks

Feb
04
3 months ago
Activity icon

Replied to Share Button Not Functioning As Needed

As a new learner, I truly appreciate you sharing this important link. I saw this several times in the source code of many web pages, but didn't know what it was. Until now. I am reading through, and I hope I can figure this thing out using your source.

Many thanks @tykus

Activity icon

Started a new Conversation Share Button Not Functioning As Needed

I have a web page with job titles that link to external websites. For example, on my page, I have a job titled "Web Developer", when the user clicks on it, It takes them to the original source (different website).

I added a share button for FB so users can share this job with others. I am using this package:

https://github.com/mohamedshuaau/laravel-sharer

Now, the problem is that when I share the link, only the source url appear in the FB post. I want the link to show with the job title, but linking to the original source. How do I achieve that?

Here is my code:

<a href="{{ sharer('facebook', $job->source, []) }}" target="_blank"><i class="px-1 fab fa-facebook-f"></i></a>


Any tips, or any better sharing plugin will be really appreciated.

Thanks

Jan
27
3 months ago
Activity icon

Started a new Conversation How Do I Test Website In Different Browsers?

Hello everyone,

Is there any suggested online tool to test my website in different browsers...I am looking for a free tool not a paid one.

Thanks for your help in advance

Jan
25
3 months ago
Activity icon

Replied to How To Repopulate Image Field Using The Old() Value Helper?

Thanks @guybrush_threepwood I will take a look at this in Livewire to see how it works.

Activity icon

Started a new Conversation How To Repopulate Image Field Using The Old() Value Helper?

Hi friends,

I have a form with a logo upload field. When validation fails, I can repopulate all the fields with the old() method, except for the image. How can I do this in Laravel? without using any JS validation.

please help me if you know how to do this.

I read somewhere that I can let the form process the image and then retrieve the same image from the db or from the session...

I appreciate your help,

Thanks

Jan
23
3 months ago
Activity icon

Replied to Add Stripe To Laravel

Thank you @jlrdw

Activity icon

Replied to Add Stripe To Laravel

So, you recommend using cashier for this? I read somewhere that Cashier shouldn't be used if the purpose is a single payment (without the need to login, or subscribe...

If using Cashier for such a scenario is ok, I can follow the tutorial here in laracasts and try to do it...

Please advice, and I really appreciate your help :)

Thanks