selvavignesh

selvavignesh

Member Since 1 Week Ago

Experience Points
730
Total
Experience

4,270 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
0
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start-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-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-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist 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.

Level 1
730 XP
Oct
17
2 days ago
Activity icon

Started a new Conversation Unique Validation Encrypted Database

Is it possible to validate encrypted database?.

Oct
16
3 days ago
Activity icon

Replied to Database

Encrypted databases are more secure?.

Activity icon

Started a new Conversation Database

Is Encrypting Database a good practice?

Activity icon

Replied to Join Two Encrypted Table.

Now I have cleared The payload is invalid error. But the actual encrypted value is displaying in the blade.

Activity icon

Replied to Join Two Encrypted Table.

Now the degree columns in both tables are not encrypted.The error i am getting is The payload is invalid.

$query=registermodel::where('userid', $userid)->select('register.name','register.userid','register.email','register.mobile','register.gender','education.e_name','education.e_degree')
                            ->join('education','register.degree','=','education.e_degree')->get();
Activity icon

Replied to Join Two Encrypted Table.

userid is not encrypted.

Activity icon

Replied to Join Two Encrypted Table.

I tried this.It is fetching the correct record.But when I tried to display them in blade, It shows The payload is invalid. Userid column is not encrypted. mobile columns in both the tables are encrypted.

$query=registermodel::where('userid', $userid)->select('*')
                            ->join('education','register.mobile','=','education.mobile')->get();
Activity icon

Started a new Conversation Join Two Encrypted Table.

Is it possible to join two encrypted table using Eloquent.

Oct
14
5 days ago
Activity icon

Replied to Laravel | Pagination - Relationship Table Query

try this in your blade.

{{ $page->render() }}
Activity icon

Replied to Like Operator In Encrypted Database

This is my trait.

<?php
namespace App;

use Crypt;

trait Encryptable
{
    public function getAttribute($key)
    {
        $value = parent::getAttribute($key);
        if (in_array($key, $this->encryptable)) {
            $value = Crypt::decrypt($value);
            return $value;
        }
        return $value;
    }

    public function setAttribute($key, $value)
    {
        if (in_array($key, $this->encryptable)) {
            $value = Crypt::encrypt($value);
        }
        return parent::setAttribute($key, $value);
    }
}
Activity icon

Replied to Like Operator In Encrypted Database

manual encryption with trait

Activity icon

Started a new Conversation Like Operator In Encrypted Database

Here the name field is encrypted.Query fetches all the values from the database.What am I missing here?.

$query=registermodel::where('name', 'like',$request->get('search').'%')->get();
Activity icon

Replied to Unable To Update Encrypted Table.

It updates the actual string to the encrypted field.But I need to update it as encrypted format.

Activity icon

Replied to Unable To Update Encrypted Table.

it is correct.It updates actual value to the encrypted database table.Do I need to write a seperate trait for this to work?.I need to update encrypted values to the encrypted database.Any suggestions?.

Activity icon

Replied to Unable To Update Encrypted Table.

No, it is not encrypted.

Activity icon

Started a new Conversation Unable To Update Encrypted Table.

$query=registermodel::where('userid',$id)->update($request->all());
Activity icon

Replied to Is This Coding Correct?

Sorry brother It is working.My bad.Thanks for your help.

Activity icon

Replied to Is This Coding Correct?

But email field is encrypted.

$items = registermodel::where('email', $email)->get();

I have already tried this before.It didn't work.

Activity icon

Started a new Conversation Is This Coding Correct?

Laravel auth with encrypted database.It is working.But is this right?.

public function fnlogin(Request $request) {
        
        $email=$request->input('email');
        $password=$request->input('password');
        $this->validate($request,[
        'email' => 'required|email',
        'password' => 'required|min:8',]);
        $items = registermodel::all()->filter(function($record) use($email) {
            if(($record->email) == $email) {
                return $record;
            }
        });
        if(count($items)>0) {

            foreach ($items as $memu) {
                
                $id=$memu['id'];
            }
        }
        else {

            return redirect()->back()->with('error','Invalid Email_id');
        }
        if (Auth::attempt(['id' => $id, 'password' => $password])) {
            
            $request->session()->put('Email_id',$email);
            return Redirect::to('View/records');

        }
        else {

            return redirect()->back()->with('error','Credentials does not match');
        }
   }

Oct
12
1 week ago
Activity icon

Replied to Login Using Encrypted Email With Laravel Auth::attempt

link to your post? brother.

Activity icon

Started a new Conversation Fetch Encrypted Data Using Where Clause

My entire database is encrypted except the primary key(id). I need to fetch email using $email variable.

$encrypted=registermodel::select('email')->where('email','=',$email)->get();
Activity icon

Replied to Login Using Encrypted Email With Laravel Auth::attempt

I tried that too.Every time the crypted value changes.

Oct
11
1 week ago
Activity icon

Started a new Conversation Login Using Encrypted Email With Laravel Auth::attempt

I have encrypted the email column. Now I want to login using emails.How can it be done?

Activity icon

Replied to Fetch Data From Encrypted Table

I encrypted $email using Crypt::encrypt.Each time it changes.

Activity icon

Started a new Conversation Fetch Data From Encrypted Table

I need to fetch a specific data from a fully encrypted table using where clause.Here the email column is encrypted.But I need to fetch user's record using their email.Any Suggestions?.Thanks in advance.

query=registermodel::select('*')->where('email','=',$email)->get();
return view('display',compact('query'));
Activity icon

Replied to Encrypt Database Not Working

It worked.Thanks brother.

Activity icon

Started a new Conversation Encrypt Database Not Working

I need to encrypt the columns named as mobile and salary but it is storing as normal string.What am I missing here?.Thanks in advance.

Model:registermodel.php

<?php

namespace App\Http\Model;

use App\Http\Controllers\Controller;

use Illuminate\Support\Facades\DB;

use Illuminate\Database\Eloquent\Model;

use App\Encryptable;

class registermodel extends Model {

    use Encryptable;

    protected $table='register';
    protected $fillable=['mobile','salary'];
    protected $encryptable = ['mobile','salary',];

    public static function fnregister($mobile,$salary) {

        $query=DB::table('register')->insert(['mobile'=>$mobile,'salary'=>$salary]);
        return $query;
    }
}

Trait:Encrytable.php

namespace App;

use Crypt;

trait Encryptable
{
    public function getAttribute($key)
    {
        $value = parent::getAttribute($key);
        if (in_array($key, $this->encryptable)) {
            $value = Crypt::decrypt($value);
            return $value;
        }
        return $value;
    }

    public function setAttribute($key, $value)
    {
        if (in_array($key, $this->encryptable)) {
            $value = Crypt::encrypt($value);
        }
        return parent::setAttribute($key, $value);
    }
}
Activity icon

Replied to Encrypt Database Not Working

i have included my model and my trait

Oct
10
1 week ago
Activity icon

Started a new Conversation Encrypt Database Not Working

Model:registermodel.php