jaythanki

jaythanki

Member Since 1 Year Ago

Porbandar, Gujarat , India.

Web Developer at Sanecraft

Experience Points 3,910
Experience Level 1

1,090 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 2
Lessons
Completed
Best Reply Awards 5
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.

01 May
2 months ago

jaythanki left a reply on Many To Many Relationship Select Single Row In Mysql

first i will create raw query than i will convert to eloquent. i think limit is not an solution

jaythanki started a new conversation Many To Many Relationship Select Single Row In Mysql

i want to select single row i have two tables

products and product_barcode

products
id
barcode
...many more flieds

product_barcode
id
product_id
barcode

i want to check barcode in products table with product_barcode for unique combination

select  product_id,pro_id,code,barcode
from 
    (
        SELECT products.id as pro_id,products.barcode as code
        FROM    products
        union
        SELECT product_barcode.product_id,product_barcode.barcode as bar
        FROM    product_barcode
    ) a  left join product_barcode on product_id=pro_id
group by pro_id```
from above query i got this output

product_id|pro_id|code|barcode 8 8 d3efd3 pro-34 9 9 pro-34 d3efd3

i want single row with code and barcode are matched in both tables
as below
product_id|pro_id|code|barcode
8 8 d3efd3 pro-34
02 Apr
3 months ago

jaythanki left a reply on Laravel Mime Type Validation Doesnt Work For .exe File When It Extension Changes To .jpg Or .gif Or .png

you should prevent from frontend to upload extention with (.exe) that file why you are allowing that request to reach at server side.

jaythanki left a reply on Yajradatatable

for angular you should use material tables as per my suggestion.

04 Mar
4 months ago

jaythanki left a reply on Curl Error (code 3)

@obet on production is show that you have not 'standard_id' in 'steel_tensile_requirements' table

22 Feb
4 months ago

jaythanki left a reply on Curl Error (code 3)

can you show the code

21 Feb
4 months ago

jaythanki left a reply on Curl Error (code 3)

had you cross check URL in curl you can check with `` var_dump(curl_getinfo($ch));

see: http://at.php.net/manual/en/function.curl-getinfo.php
How does 'url' look like?

jaythanki left a reply on Curl Error (code 3)

url supplied may be invalid or something isn't properly urlencoded in curl request

jaythanki started a new conversation How Can I Make Different HTML And Component Files In Vue.js?

Because when there is huge application approx. 500+ lines of code in single file it is hard to find some variables to alter.Is there is a way to do seperate files same as angular. I am beginner in vuejs. Thanks in advance.

20 Feb
4 months ago

jaythanki left a reply on Laravel Eloquent Relationship

@softwebglobe close conversation if your issue is resolve.

jaythanki left a reply on Laravel Eloquent Relationship

@SOFTWEBGLOBE if you want to get the models that have at least one related model in this relation. $users = User::has('blogpost.replies')->get();

jaythanki left a reply on Laravel Eloquent Relationship

can you show the code what you had tried ?

25 Jan
5 months ago

jaythanki left a reply on How To Return The Url Of An Image File In Laravel ?

where you are storing your images on server. can you give path ?

23 Jan
5 months ago

jaythanki left a reply on Passing Laravel Route And Parameter In Javascript

which request you are using ajax request or form request can show me the code

jaythanki left a reply on DataTables Not Working

which problem you are facing in datatables. Can you show me the error.

22 Jan
5 months ago

jaythanki left a reply on How To Convert This Query Into Eloquent?

// $input['something']= YOUR VALUE
$demo=MODEL::where('created_at', '>=','2018-12-01');
$demo = $demo->Where(function ($query) use ($input) {
                    $query->orwhere('name', 'like', '%' . $input['something'] . '%')
                    ->orwhere('id', 'like', '%' . $input['something'] . '%')
                    ->orwhere('city', 'like', '%' . $input['something'] . '%');
                  });
  $demo = $demo->take()->skip(); // if you are using for pagination skip this if not using for pagination
                  $demo=$demo->get();
09 Jan
6 months ago

jaythanki left a reply on Multiple Tables With Multiple Columns Validation For Unique Values

already created custom validation for the same but i want to pass array in custom validation from model becuase i want to check each combination of unique values.

//Service Provider 
Validator::extend('unique_code', function($attribute, $data, $parameters,$validator ) {
// my code for checking unique values 
});

//model of table 2
// i want to pass array of ids from my controller which is had foreign key of table 1 to check with code in table 2
public static function validate($data) {
  $rule = array(
      'barcode' => 'required|max:255|unique_code:' . array(all ids). '|unique:table2,code,NULL,id,table_1_id,' . array(all ids),
    );
    $messages = array(
      'unique' => ':attribute has already been taken.',
    );
    $data = Validator::make($data, $rule, $messages);
    $data->setAttributeNames(array(
      'code' => ucfirst(SYS_CODE)
    ));
    return $data;
  }

above code i had tried but can't pass array from model to service provider in $parameters

jaythanki started a new conversation Multiple Tables With Multiple Columns Validation For Unique Values

table 1 table 2 have id,code,table_1_id - table 3 have id,table_1_id,table_2_id,code

i want to create custom validation in laravel to match each value while creating table 2 values and table_1_id (array) it can be multiple

code should be unique with combination of table_1_id , table_2_id and code

it should match with table 2 and in table 3 for unique combination of ids and code

07 Jan
6 months ago

jaythanki left a reply on Bucket Name Not Appearing In S3 Url

yeah this is right @flyingl123

but you can also give dynamic PATH for your bucket

AWS_URL = https://s3.amazonaws.com/mybucket
AWS_URL_IMAGE_PATH=/images/product_image/
AWS_URL_FILE_PATH=/file/
02 Jan
6 months ago

jaythanki left a reply on Storage Url From S3

@mindexperiment while storing an file had you put 'public' $store = Storage::disk('s3')->put(FILE_PATH, FILE_CONTENT, 'public');

26 Dec
6 months ago

jaythanki left a reply on Want To Create PDF File And Send Email In My Laravel 5.3

change in your composer.json put this "barryvdh/laravel-dompdf": "v0.8.3" and than run composer update beacuse master batch is not stable to use with laravel 5.3

25 Dec
6 months ago

jaythanki left a reply on How To Install Laravel 5.7 (not 5.2) Using Composer

If your version of PHP is running downgrade than automatically laravel will install downgrade according to compatible version.

you can get information from below link https://laravel.com/docs/5.7/installation

jaythanki left a reply on How To Install Laravel 5.7 (not 5.2) Using Composer

which version of PHP you are using

05 Dec
7 months ago
04 Dec
7 months ago

jaythanki left a reply on Uncaught TypeError: Illegal Invocation

@kvithalani also add to your form tag

<form class="m-form " method="POST" action="" id="create_form" enctype="multipart/form-data" data-toggle="validator">

jaythanki left a reply on Uncaught TypeError: Illegal Invocation

@kvithalani you need to add enctype in ajax as below

$.ajax({
           url: '/admin/update/sub-product-attribute-value/'+id,
           type: 'PUT',
           data: data,
       enctype: 'multipart/form-data' // ADD THIS 
           dataType: 'json',
           success:function(response)
           {
             if(response.code == 200) {
               window.location.reload();
             } else {

             }
              //
           }, error: function(response) {
             alert(response);
           }
           });
28 Nov
7 months ago

jaythanki left a reply on Owl Carousel With Same Heights (Bootstrap)

@ravipw1801 put height: auto; in your css

jaythanki left a reply on Css And Js Files Are Not Loading

@haxordeveloper yeah you need to give extentions after file names. btw can you provide your folder structure inside public ? for more details

03 Nov
8 months ago

jaythanki left a reply on I Want To Import Excel Data Into Database I Have Use Maatwebsite/excel In Laravel

try this

composer self-update

or you need to update memory limit

jaythanki left a reply on I Want To Import Excel Data Into Database I Have Use Maatwebsite/excel In Laravel

@harsha234 Depends on your server. yes if your server contain composer than you need to run below command

composer update 

jaythanki left a reply on I Want To Import Excel Data Into Database I Have Use Maatwebsite/excel In Laravel

@harsha234 after deployment have you run below command:

composer dump-autoload
24 Oct
8 months ago

jaythanki left a reply on Calendar Package

@KSHITIZMITTAL You didn't specified any information where you want to use it. But you can use https://fullcalendar.io/ for frontend service JavaScript package in your laravel application.

jaythanki left a reply on API Login Without Database And Get JWT After Login

@Nelvan_Balthazar try using this it may solve your issue

use Illuminate\Http\Request; // add this


public function login(Request $request) // change this
{
    $credentials = request(['email', 'password']);

    if (! $token = auth()->attempt($credentials)) {
    return response()->json(['error' => 'Unauthorized'], 401);
    }

    return $this->respondWithToken($token);
 }
19 Oct
8 months ago

jaythanki left a reply on Validation On Update: Unique

@zoroaster "sometimes" will only work when there is 'emal' present in your array/object when you are passing in Validator method.

17 Oct
8 months ago

jaythanki left a reply on Real Time Chat Application Suggestion (open Source)

@crnkovic yeah you are right. sorry for not looking deep into it

16 Oct
9 months ago
10 Oct
9 months ago

jaythanki left a reply on Weird Behavior In Yajra Datables Controller Function.

@dan3460 okay fine so you should now mark as solved discussion it may help others .

jaythanki left a reply on Dropdown Menu

@DAVY_YG for example you can do like this

//just for example this may vary as per your code
 <li  data-toggle="collapse" data-target="#menu1" class="collapsed active side-menu-border">
      <a class=" text-uppercase" href="#">menu 1<i class="fa fa-caret-down"></i></a>
    </li>

    <ul class="sub-menu collapse" id="menu1">
      <li > <a class=" text-uppercase sub-nav" href="{{ route('create'}}">add new</a></li>
      <li><a class=" text-uppercase sub-nav" href="{{ route('list' }}">view all</a></li>
    </ul>
    <li  data-toggle="collapse" data-target="#menu2" class="collapsed active side-menu-border">
      <a class=" text-uppercase" href="#"> menu 2 <i class="fa fa-caret-down"></i></a>
    </li>
    <ul class="sub-menu collapse" id="menu2">
       <li > <a class=" text-uppercase sub-nav" href="{{ route('create'}}">add new</a></li>
      <li><a class=" text-uppercase sub-nav" href="{{ route('list' }}">view all</a></li>
    </ul>
  
09 Oct
9 months ago

jaythanki left a reply on Weird Behavior In Yajra Datables Controller Function.

@DAN3460 can you show ur model file of Shipper and Grower.

jaythanki left a reply on Importing Excel File

@faizaltkl can you show me your code ?

08 Oct
9 months ago

jaythanki left a reply on Importing Excel File

@FAIZALTKL check if any rows is not blank in your file. Try to create new file and do fresh upload again. i guess you are doing like this

$data = Excel::load($filename, function($reader) {})->get();
$totalRows = $data->count();

jaythanki left a reply on The Page Has Expired Due To Inactivity. Please Refresh And Try Again.

@maliknaqibullah you can run on deployment

php artisan cache:clear
php artisan config:clear

jaythanki left a reply on The Page Has Expired Due To Inactivity. Please Refresh And Try Again.

@maliknaqibullah after changing have to clean browser's cache, Laravel cache (php artisan cache:clear, php artisan config:clear, php artisan clear-compiled, php artisan route:clear, php artisan view:clear) - and it didn't work ?

or may be i m not sure problem comes from the CSRF token verification which fails. So either you're not posting one or you're posting an incorrect one.

You can either post a CSRF token in your form by calling:

{{ csrf_field() }}

Or exclude your route (NOT RECOMMENDED DUE TO SECURITY) in app/Http/Middleware/VerifyCsrfToken.php:

protected $except = [
    'your/route'
];
06 Oct
9 months ago

jaythanki left a reply on Error On Laravel Entrust When Running Entrust:migration

@PatrickL because they have changed one method from handle to fire so you getting this error. change your version as below in (composer.json)

"zizaco/entrust": "dev-master"

than run

composer update
composer dump-autoload

jaythanki left a reply on Api Create With A Different Column Name

@shez1983 because i don't want to expose my database fields for security.

jaythanki left a reply on How To Retrieve Soft Deleted Models

nope :D @Snapey i just open account on laracasts before 4 months but i wasn't active so far. So now i m active on laracasts so i gave an answer.

jaythanki left a reply on Want To Create A Pdf From The Webpage Created Using Dompdf

@gaan10 you are using blade engine or any frontend ?

jaythanki left a reply on Api Create With A Different Column Name

@SPACEDOG4 I m using in controller as:

 public function store(Request $request) {
        $input = $request->all();

//validation check in model 
  $validation = Product::validateProductCreateApi($input);
  $data['name'] = $input[PRO_NAME]; // DATABASE field $data['name'] AND REQUEST field $input[PRO_NAME]
  $data['sku'] = $input[PRO_SKU];
  $data['type'] = $input[PRO_TYPE];
}

is it right or not ?

jaythanki left a reply on Password Reset View Not Updating

@MBSMI you had change any file name in views folder ?

jaythanki left a reply on Problem Validation

@DANIEL21GT which error ?