Sabbir345

Sabbir345

Member Since 1 Year Ago

Software Engineer at RootSoft IT

Experience Points 3,820
Experience Level 1

1,180 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 9
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.

12 Sep
3 days ago

Sabbir345 left a reply on Use Database With Conditional Statement ( When Login) In Laravel

@jlrdw

I want to dynamically change connection

11 Sep
4 days ago

Sabbir345 started a new conversation Use Database With Conditional Statement ( When Login) In Laravel

I have two DB connection in my project. I would like to add a condition to the Login System. If I select DB1 then project all information get from The DB1 and login in from DB1 or if I select DB2 then project all information get from The DB2.

It is possible? if possible then how to Add.

Need Help

10 Jul
2 months ago

Sabbir345 started a new conversation Invalid Argument Supplied For Foreach()

My controller

$admins = Admin::where('permission' , 8) ->get();

    $arr = [];


    foreach ($admins as $admin) {

        $date1 = now();

        $date    =  $date1->format('Y-m-d');
        
        $data = count(Tradelicence::where('admin_id' , $admin['id'])
                            ->where('created_at' , 'like', "%$date%")
                            ->get());

        $name = $admin['name'];

        array_push($arr, [ $name => $data]);
    }

    $arrays = json_encode($arr);

My Blade

@foreach($arrays as $key => $value)

        <td>{{ $key }}</td>
        <td>{{ $value }</td>

      </tr>

@endforeach

04 Jul
2 months ago

Sabbir345 started a new conversation How To Fetch Three Table Data

Lists Table ..................................

id , title , body , list_user_id ,

List_User Table .......................................

id , user_id , list_id ,

User Table ...............................

id , name , address ,

I want to show lists table data with their multiple user name instead of user_id.

Need Help

25 Apr
4 months ago
13 Apr
5 months ago

Sabbir345 left a reply on Whoops, Looks Like Something Went Wrong.

already I run it -- php artisan key:generate

Sabbir345 left a reply on Whoops, Looks Like Something Went Wrong.

a few hours ago I do it but can't resolve.

Sabbir345 left a reply on Whoops, Looks Like Something Went Wrong.

This problem detect @vandan

No application encryption key has been specified. {"exception":"[object] (RuntimeException(code: 0): No application encryption key has been specified. at /home/bali/public_html/tea/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php:42)

Sabbir345 started a new conversation Whoops, Looks Like Something Went Wrong.

After server update getting the error in my app

please help me.

28 Mar
5 months ago

Sabbir345 started a new conversation "Personal Access Client Not Found. Please Create One. " In Laravel Passport

I am using laravel passport. When i am locally testing my api with postman there is no problem when i am testing with my main domain then postman give me a error.

error : Personal access client not found. Please create one.

Sabbir345 left a reply on Mail:: Doesn't Work

Step 1.

< form action="{{ route('contact.store')}}" method="POST" > @csrf < div class="">

            @if(session()->has('message'))
                < div class="alert alert-success">
                    {{ session()->get('message') }}
                < /div>
            @endif

            
            < div class="row">
                < div class="col-md-12">
                    < div class="form-group">
                        < label> Email </label>
                        < input class="form-control" type="text" name="email" id="example-text-input1" placeholder="" >

                    < /div>
                < /div>
            < /div>
            < div class="row">
                < div class="col-md-12">
                    < div class="form-group">
                         < label> Description </label>
                        < textarea class="form-control" name="description" style="height: 200px"></textarea>

                    < /div>
                < /div>
            < /div>
            < div class="row">
                < div class="col-md-12">
                    < div class="form-group">
                        < button class="btn btn-lg btn-block btn-primary">Submit</button>
                    < /div>
                < /div>
            < /div>
        < /div>
        < /div>          
    < /div>
< /div>

< /div> < /div> < /form>

Step 2.

public function contactUsStore(Request $request){

$name    = Auth::user()->username;
$email   = $request->email;
$title   = "From Pension App";
$content = $request->description;


\Mail::send('User.contact_email', ['name' => $name, 'email' => $email, 'title' => $title, 'content' => $content], function ($message) {

    $message->to('[email protected]')->subject('From Pension App!');
});

  $contact   = new Contact();

$contact->user_id        =  Auth::user()->id;
$contact->email          =  $request->email;
$contact->description    =  $request->description;

$contact->save();

  return redirect()->back()->with('message', 'Successfully submitted your suggestions.');

} Step 3.

Name: {{ $name }}

E-Mail: {{ $email }}

Subject: {{ $title }}

Message: {{ $content }}

Step 4 :

MAIL_DRIVER=smtp MAIL_HOST=smtp.mailgun.org MAIL_PORT=587 [email protected] MAIL_PASSWORD=mypass MAIL_ENCRYPTION=tls

Sabbir345 left a reply on How To Add Search Functionality In A Table In Laravel

Step 1

< input type="text" v-model="search" class="form-control " >

< button class="btn btn-primary">

Step 2

export default {

data () {

  return {
    alldata:[],
    search:'',
    perPage: 20,
    totalData: 0,
  }
},
watch: {
    search() {
      if (this.search.length != 0) {
        this.TableData();
      }
    }
},

Step 3

NB: make a method TableData

     TableData(nextPage = null) {
      

       let url = `http://127.0.0.1:8000/searchl?per_page=${this.perPage}`;

        if(nextPage) {
          url += `&page=${nextPage}`;
         
        }
        if (this.search.length) {
            url += `&search=${this.search}`;
        }
       

Then call axios

step 4

      axios.get(url)
24 Mar
5 months ago

Sabbir345 left a reply on Laravel Send Email SMTP

Problem solved

Sabbir345 started a new conversation Laravel Send Email SMTP

where is the problem. Please help

Step 1.

< form action="{{ route('contact.store')}}" method="POST" > @csrf < div class="" style="padding-left: 10px;padding-right:10px;"> < div class="h-100"> < div class=""> < div class=""> < div class=""> < div class="">

                @if(session()->has('message'))
                    < div class="alert alert-success">
                        {{ session()->get('message') }}
                    < /div>
                @endif

                
                < div class="row">
                    < div class="col-md-12">
                        < div class="form-group">
                            < label> Email </label>
                            < input class="form-control" type="text" name="email" id="example-text-input1" placeholder="" >

                        < /div>
                    < /div>
                < /div>
                < div class="row">
                    < div class="col-md-12">
                        < div class="form-group">
                             < label> Description </label>
                            < textarea class="form-control" name="description" style="height: 200px"></textarea>

                        < /div>
                    < /div>
                < /div>
                < div class="row">
                    < div class="col-md-12">
                        < div class="form-group">
                            < button class="btn btn-lg btn-block btn-primary">Submit</button>
                        < /div>
                    < /div>
                < /div>
            < /div>
            < /div>          
        < /div>
    < /div>
< /div>

< /div> < /form>

Step 2.

public function contactUsStore(Request $request){

    $name    = Auth::user()->username;
    $email   = $request->email;
    $title   = "From Pension App";
    $content = $request->description;


    \Mail::send('User.contact_email', ['name' => $name, 'email' => $email, 'title' => $title, 'content' => $content], function ($message) {

        $message->to('[email protected]')->subject('From Pension App!');
    });
   
      $contact   = new Contact();

    $contact->user_id        =  Auth::user()->id;
    $contact->email          =  $request->email;
    $contact->description    =  $request->description;

    $contact->save();

      return redirect()->back()->with('message', 'Successfully submitted your suggestions.');

}

Step 3.

Name: {{ $name }}

E-Mail: {{ $email }}

Subject: {{ $title }}

Message: {{ $content }}

Step 4 :

MAIL_DRIVER=smtp MAIL_HOST=smtp.mailgun.org MAIL_PORT=587 [email protected] MAIL_PASSWORD=mypass MAIL_ENCRYPTION=tls

where is the problem. Please help

23 Mar
5 months ago

Sabbir345 started a new conversation Image Uploading Without Submit In Laravel

Here is my code

// HTML

< div class="element" > < i class="fa fa-camera"> < input type="file" name="image" id="profile_pic" > /div>

// JS

$("i").click(function () { $("input[type='file']").trigger('click'); });

$('input[type="file"]').change(function () { if ($(this).val() != '') { console.log(this); } });

How can i find image path. please help me

16 Mar
5 months ago

Sabbir345 started a new conversation PHP Sendmail Function How To Use In Laravel

$from = "[email protected]"; $to = "sabbir94@gmail.com"; $subject = "Checking PHP mail"; $message = "PHP mail works just fine"; $headers = "From:" . $from; mail($to,$subject,$message, $headers);

please help me

##_client requirement to use php mail function use :(

Sabbir345 left a reply on Input Field Allow Two Digits After Decimal

#Solved

input type="text" id="amount" class="decimal"

$('#amount').bind('paste', function () { var self = this; setTimeout(function () { if (!/^\d*(.\d{1,2})+$/.test($(self).val())) $(self).val(''); }, 0); });

$('.decimal').keypress(function (e) {
    var character = String.fromCharCode(e.keyCode)
    var newValue = this.value + character;
    if (isNaN(newValue) || hasDecimalPlace(newValue, 3)) {
        e.preventDefault();
        return false;
    }
});

function hasDecimalPlace(value, x) {
    var pointIndex = value.indexOf('.');
    return  pointIndex >= 0 && pointIndex < value.length - x;
}

Sabbir345 left a reply on Input Field Allow Two Digits After Decimal

@auniik ,

Actually, I want to need when the user type two digits after the decimal then prevents the input system.

Sabbir345 started a new conversation Input Field Allow Two Digits After Decimal

I have an input field. Now I want to allow two digits after decimal in laravel blade.

ex : 2245.50

01 Mar
6 months ago

Sabbir345 left a reply on Searching Multiple Fields Over Multiple Tables

@screenbeetle please read my question again. I think you can't read properly

28 Feb
6 months ago

Sabbir345 started a new conversation Searching Multiple Fields Over Multiple Tables

I have 2 Tables: Users and HealthCheckup.

In the users table I hold information like their name, phone, address, etc. others hand health_checks table i hold info like BMI , prescription, anemia , doctor_name etc

My issue is when i am searching with One input field with this query work fine

$users = HealthCheckup::whereHas('user', function($query) use($search){ $query->Where('name', 'like', "%$search%"); })->orWhere('prescription', 'like', "%$search%") ->orderBy('id', 'DESC') ->with('user') ->paginate(20);

but when i am increasing multiple input with this query doesn't work properly

$users = HealthCheckup::whereHas('user', function($query) use($name){ $query->Where('name', 'like', "%$name%"); })->orWhere('prescription', 'like', "%$prescription%") ->orderBy('id', 'DESC') ->with('user') ->paginate(20);

26 Sep
11 months ago

Sabbir345 left a reply on Laravel Eloquent

@Vilfago . Actually you are missing to pass a parameter. by the way thanks for your hard work.

            $data =  Challan::Where('tea_estates_id', $select_search)
                    ->where(function($query) use($searchkey){

                        return $query->Where('challan', 'like', "%$searchkey%")
                        ->orWhere('driver_name', 'like', "%$searchkey%")
                        ->orWhere('driving_license_no', 'like', "%$searchkey%");

                   })->paginate($perPage);

Sabbir345 started a new conversation Laravel Eloquent

Its is possible to write multiple where clause when using like search ?

$data = Challan::Where('tea_estates_id', $this->complainType()) ->Where('challan', 'like', "%$searchkey%") ->orWhere('driver_name', 'like', "%$searchkey%") ->orWhere('driving_license_no', 'like', "%$searchkey%")->paginate($perPage);

20 Sep
11 months ago

Sabbir345 left a reply on Dynamic Input Field Disable

@D9705996 Thank you so much.. You are really great.

19 Sep
11 months ago

Sabbir345 started a new conversation Dynamic Input Field Disable

i have a dynamic input field using vue js. when i click add button create a input field and when i click remove button then input field remove . its works awesome

now i am facing a problem. i want when i click add button then without last field ...all field disable and when i am last input field remove then last disable input frequently enable.

please help me

06 Sep
1 year ago

Sabbir345 left a reply on Image Upload

did not work

Sabbir345 left a reply on Image Upload

@faizatkl

No. okay will try

Sabbir345 left a reply on Image Upload

export default {

    data () {

        return {
         
             user:{
                
                photo : '',
                p1certificate:'',
                p2certificate:'',
                p3certificate:'',

            },
        }
},
 methods:{

        profileImage(e){

            this.user.photo = e.target.files[0];

        },
     p1Certificate(e){

            this.user.p1certificate = e.target.files[1];

        },
    p2Certificate(e){

            this.user.p2certificate = e.target.files[2];

        },
   p3Certificate(e){

            this.user.p3certificate = e.target.files[3];

        },

}

Sabbir345 left a reply on Image Upload

can you give me example please. if you don't mind

Sabbir345 started a new conversation Image Upload

I have a four image upload field in one page. now I’m facing a problem. . when i am upload an image they are store in one array but how to recognize which image which field. please help me

i think its need to be key value pair but how ?

<input type="file" @change="profileImage" /> <input type="file" @change="p1Certificate" /> <input type="file" @change="p2Certificate" /> <input type="file" @change="p3Certificate" />

03 Sep
1 year ago

Sabbir345 started a new conversation Eliment UI Table Index Problem

i have a eliment ui table. when i am click eliment ui pagination . after one page index start with 1 .

example : if first page 10 row. then legally second page row start index with 11 , 12 and so on but my index start with 1 , 2

Here is my Code

<el-table :data="adminlog" stripe border style="width: 100%"> <el-table-column type="index" label="ID" width="180"> </el-table-column>

            <el-table-column
                  prop="created_at"
                  label="Login Time">
            </el-table-column>
            
            </el-table>

<el-pagination background class="fix" @current-change="handleCurrentChange" :page-size="perPage" layout="total, prev, pager, next" :total="totalData"> </el-pagination>

export default {

    data () {

        return {
            adminlog:[],
            perPage: 10,
            totalData: 0,
        }
    },
    methods: {
        handleCurrentChange(next) {
            this.TableData(next);
        },
        TableData(nextPage = null){
            let url = `http://127.0.0.1:8000/admin/log-data?per_page=${this.perPage}`;
            if (nextPage) {
                url += `&page=${nextPage}`;
            }
            axios.get(url)
            .then((response) => {
                this.adminlog  = response.data.adminLogList.data
                this.totalData = response.data.adminLogList.total;
            })
            .catch((error) => {

            })
        }
    },
    mounted () {
        this.TableData();
        
    },

}
19 Aug
1 year ago

Sabbir345 started a new conversation Page Not Redirect

Here is my route.js code

import ApplicationApp from './ApplicationApp.vue'; import VueRouter from 'vue-router';

import view from './component/view.vue'; import save from './component/save.vue'; import edit from './component/edit.vue';

window.axios = require('axios');

export default new VueRouter({ routes: [ { path: '/', name: 'applicationlist', component: ApplicationApp,

        children: [
            {
                path: '/view/:applicationId',
                name: 'applicationlist.edit',
                component:edit
            },
            {
                path: '/view/:applicationId',
                name: 'applicationlist.view',
                component:view
            },
        ]
    }
  ]

});

Here is my application.js code

import router from './route'; import Vue from 'vue' import VueRouter from 'vue-router'; Vue.use(VueRouter)

import 'element-ui/lib/theme-chalk/index.css' import Element from 'element-ui' import locale from 'element-ui/lib/locale/lang/en'

Vue.use(Element, {locale})

new Vue({ router, }).$mount('#app');

Here is my Application

Application List

<el-table :data="applicationlist" stripe border > <el-table-column prop="id" label="ID" > </el-table-column> <el-table-column prop="" label="Applicant Name" > </el-table-column>

            <el-table-column
                   width="220"
                  label="Action ">
                  <template slot-scope="scope">
                     <el-button type="primary" round @click="handleEdit(scope.row.id)"><i class="el-icon-edit"></i></el-button>
                     <el-button type="success" round @click="handleView(scope.row.id)"><i class="el-icon-view"></i></el-button>
                     <el-button type="danger" round @click="handleDelete(scope.row.id)"><i class="el-icon-delete"></i></el-button>
                  </template>
            </el-table-column>

            
            </el-table>
       </div>
    </div>

       <div class="col-md-12">
            <li @click.prevent="handleNextPage(1)"><a href="">Previous</a></li>
       </div>
       <div class="col-md-12">
            <li @click.prevent="handleNextPage(2)"><a href="">Next</a></li>
       </div>
    </div>
</div>

export default {

    data () {

        return {

             applicationlist:[],

        }
    },

    methods: {
        handleView(id) {
            
            this.$router.push({
                'name': 'applicationlist.view',
                'params': {
                    'applicationId': id,
                }
            });

        },
        handleNextPage(page) {
             axios.get('http://127.0.0.1:8000/admin/applicationlist?page='+page)
            .then((response) => {
                this.applicationlist = response.data.applicationList.data
            })
            .catch((error) => {

            })
        }
    },
    mounted () {

        // var app = 'http://127.0.0.1:8000/';
      
        axios.get('http://127.0.0.1:8000/admin/applicationlist')
            .then((response) => {
                this.applicationlist = response.data.applicationList.data
            })
            .catch((error) => {

            })

        
    },

}
06 Aug
1 year ago

Sabbir345 started a new conversation XSRF-TOKEN Cookie Not Securely Set As HttpOnly

how to handle it

05 Aug
1 year ago

Sabbir345 left a reply on Missing HTTP Security Headers

@martinbean

Actually I am confused. which middleware need to add. any example please

Sabbir345 started a new conversation Missing HTTP Security Headers

  1. X-Frame-Options
  2. X-XSS-Protection
  3. Strict-Transport-Security
  4. X-Content-Type-Options

please help

25 Jul
1 year ago

Sabbir345 left a reply on How To Set A Value To A File Input In Laravel

Actually i want to check - the file input is filled or not.

Sabbir345 started a new conversation How To Set A Value To A File Input In Laravel

< input type="file" name="photo" value="{{ URL::asset('/img/'.$userInfo->photo) }}" required / >

file value not show

16 Jul
1 year ago

Sabbir345 started a new conversation Selected Data Not Select In Modal

drop down data fetch from database using jquery and use For loop for show. Here is my jquery code.

    var subtypeurl = "{{ route('business.shop') }}";

    $('.infoShow').on('click', function() {
                      
       $.get(subtypeurl, function(response) {
          
            $select = $('#select1')

            $('#select1').empty();
                   
            
            for(var i = 0; i < response.length; i++) {
                $select.append('<option value="' + response[i].id + '">' +response[i].id +' '+response[i].business_type +' '+response[i].business_type_bangla + '</option>')
            }
           
        })
    });

Selected value fetch from another table

$('#editForm').attr('action',BUpdateUrl); $.get(businessEditUrl, function(response) { $('#business_english').val(response.business_subtype); $('#business_bangla').val(response.business_subtype_bangla); $('#business_type_id').val(response.business_type_id);

              })
         })
09 Jul
1 year ago

Sabbir345 started a new conversation Password Forget Recover Using Phone

I have a sms api. Now i want password reset with phone not email. please help

06 Jul
1 year ago
05 Jul
1 year ago

Sabbir345 started a new conversation How To User Login Log Store.

Here Is my code. where i place it.

UserLog::create([ 'user_id' => Auth::user()->id, 'ip' => $request->getClientIp(), 'browser' => $request->header('User-Agent'), 'timestamp' => Carbon::now() ]);

30 Jun
1 year ago

Sabbir345 left a reply on Multi Auth Password Match But Redirect Problem

When i use

return redirect()->intended('/admin/dashboard'); then some times create Problem

but when i use return Redirect::to('/admin/dashboard'); then its cool ...no error

but Why @adamprickett

Sabbir345 left a reply on Multi Auth Password Match But Redirect Problem

Actually its some times successfully redirect dashboad but some times do not go dashboard

Sabbir345 left a reply on Multi Auth Password Match But Redirect Problem

issue : when i give user name and password then successfully match the credential but after successfully credential do not go to dashboard.still show login page.

i check its match my credential

@adamprickett

Sabbir345 started a new conversation Multi Auth Password Match But Redirect Problem

Here is my route:

Route::get('admin/login', 'Auth\[email protected]')->name('admin.login'); Route::post('admin/login', 'Auth\[email protected]')->name('admin.login.submit');

Route::prefix('admin')->group(function() {

Route::get('/dashboard','[email protected]')->name('admin.dashboard');
Route::get('/logout','[email protected]')->name('admin.logout');

});

Here is my Controller

public function login(Request $request) { $this->validate($request, [ 'username' => 'required', 'password' => 'required' ]);

  if (auth()->guard('admin')->attempt(['username' => $request->username, 'password' => $request->password])) {

    return redirect()->intended(route('admin.dashboard'));
  }

  return redirect()->back()->withMessage("Credentials are invalid. Please try again!");
}
26 Jun
1 year ago

Sabbir345 started a new conversation Multi Authentication

I have a two table .One admins and another one is users. Users panel login module is complete.

now i have facing with multi authentication . how can manage it. total admins are 12 .

please help