marfino3028

marfino3028

Member Since 7 Months Ago

Experience Points
370
Total
Experience

4,630 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 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.

Level 1
370 XP
Oct
13
1 week ago
Activity icon

Started a new Conversation [Vue Warn]: Error In Render: "TypeError: _vm.manage Is Undefined"

[Vue warn]: Error in render: "TypeError: _vm.manage is undefined"

found in

---> at src/views/pages/owner/Kelola.vue at src/layouts/main/Main.vue at src/App.vue vue.runtime.esm.js:619 TypeError: _vm.manage is undefined render Kelola.vue:237

Kelola.Vue manage () { //ganti suppliers dengan menu yang baru return this.$store.state.dataManage.manage //ganti suppliers dengan menu yang baru | dataSupplier wajib sama dengan bagian created > register module | ganti nama supplierswajib sama dengan state.js nya }, queriedItems () { return this.$refs.table ? this.$refs.table.queriedResults.length : this.manage.length //ganti suppliers dengan menu yang baru } },

Sep
29
3 weeks ago
Activity icon

Replied to How To Call The Input Type According To The Column Type In The Database

I got this eror Access to undeclared static property: Collective\Html\FormFacade::$metadatas (View: C:\xampp\htdocs\difitech\paul\resources\views\catalogs\fields.blade.php)

Sep
28
3 weeks ago
Activity icon

Started a new Conversation How To Call The Input Type According To The Column Type In The Database

@foreach ($metadata as $metadatas) {!! Form::label(.$metadatas->metadata_key, .$metadatas->metadata_key) !!} {!! Form::.$metadatas->metadata_type(.$metadatas-> metadata_id, null, ['class' => 'form-control', 'name'=>]) !!} @endforeach

Sep
24
1 month ago
Activity icon

Replied to Error Cannot Read Property 'name' Of Undefined

At Console nothing is wrong

moduleAuthActions.js

import jwt from '../../http/requests/auth/jwt/index.js'
import router from '@/router'
export default {
// JWT
loginJWT ({ commit }, payload) {
return new Promise((resolve, reject) => {
  jwt.login(payload.userDetails.email, payload.userDetails.password)
    .then(response => {

      // If there's user data in response
      if (response.data.userData) {

        
        commit('UPDATE_USER_INFO', response.data.userData, {root: true})
      
        // Navigate User to homepage
        router.push(router.currentRoute.query.to || '/')

        
        // Set accessToken
        localStorage.setItem('accessToken', response.data.accessToken)
        
        // Update user details

        // Set bearer token in axios
        commit('SET_BEARER', response.data.accessToken)


        resolve(response)
      } else {
        reject({message: 'Wrong Email or Password'})
      }

    })
    .catch(error => { reject(error) })
})
},
register (payload) {
//const { name, email, password, confirmPassword } = payload.userDetails
//const nameL = 'data'
return new Promise((resolve, reject) => {
  console.log(payload)
  jwt.registerUser(payload.userDetails.name, payload.userDetails.email, payload.userDetails.password)
    .then(response => {

      if (response.data.payment_url) {
        const urli = response.data.payment_url
        router.push(urli)
      }
      
      // Redirect User
      //router.push(router.currentRoute.query.to || '/')

      // Update data in localStorage
      // localStorage.setItem('accessToken', response.data.accessToken)
      //commit('UPDATE_USER_INFO', response.data.userData, {root: true})

      resolve(response)
    })
    .catch(error => { reject(error) })
})

} }

jwt/index.js

import axios from '../../../axios/index.js'

export default { login (email, pwd) { return axios.post('/api/v1/login', { email, password: pwd }) }, registerUser (name, email, password) { return axios.post('/api/v1/register', { name, email, password }) }//, // refreshToken () { // return axios.post('/api/auth/refresh-token', {accessToken: localStorage.getItem('accessToKen')}) // } }

Activity icon

Started a new Conversation Error Cannot Read Property 'name' Of Undefined

Register.vue html

<vs-input
                  v-validate="'required|name|min:3'"
                  data-vv-validate-on="blur"
                  label-placeholder="Name"
                  name="name"
                  placeholder="Name"
                  v-model="name"
                  icon-pack="feather"
                  icon="icon-user"
                  class="w-full"
                />
                <span class="text-danger text-sm">{{
                  errors.first('name')
                }}</span>
              </div>

Register.vue js

export default {
data () {
 return {
  name: 'ujicoba',
  email: '@gmail.com',
  password: '12345678',
  confirm_password: '12345678',
  //coupon: '',
  isTermsConditionAccepted: false
}
},
computed: {
validateForm () {
  return (
    !this.errors.any() && this.name !== '' && this.email !== '' && this.password !== '' && this.confirm_password 
  !== '' && this.isTermsConditionAccepted === true
  )
}
},
methods: {
checkLogin () {
  if (this.$store.state.auth.isUserLoggedIn()) {
    this.$vs.notify({
      title: 'Login Attempt',
      text: 'You are already logged in!',
      iconPack: 'feather',
      icon: 'icon-alert-circle',
      color: 'warning'
    })
    return false
  }
  return true
},
register () {
  // If form is not validated or user is already login return
  if (!this.validateForm || !this.checkLogin()) return
  //this.$vs.loading()
  const payload = {
    
    userDetails: {
      name: this.name,
      email: this.email,
      password: this.password//,
      //confirmPassword: this.confirm_password
    },
    notify: this.$vs.notify
  }
  this.$store.dispatch('auth/register', payload)
    .then(() => { this.$vs.loading.close() })
    .catch(error => {
      this.$vs.loading.close()
      this.$vs.notify({
        title: 'Error',
        text: error.message,
        iconPack: 'feather',
        icon: 'icon-alert-circle',
        color: 'danger'
      })
    })
}

} }

Sep
23
1 month ago
Activity icon

Started a new Conversation [Vue Warn]: Unknown Custom Element: <data-view-sidebar> - Did You Register The Component Correctly? For Recursive Components, Make Sure To Provide The "name" Option.

[Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option. found in

---> at src/views/pages/owner/Pelanggan.vue at src/layouts/main/Main.vue at src/App.vue

DataViewSidebarPelanggan.vue

<component :is="scrollbarTag" class="scroll-area--data-list-add-new" :settings="settings" :key="$vs.rtl">

  <div class="p-6">

   <vs-input icon-pack="feather" icon="icon-briefcase" label-placeholder="Judul Toko" class="w-full mt-8" />

              <vs-input icon-pack="feather" v-model="dataTagline" name="item-tagline" icon="icon-briefcase" label-placeholder="Tagline" class="w-full mt-8" />

              <vs-input icon-pack="feather"  v-model="dataWA" name="item-wa" icon="icon-briefcase" label-placeholder="Nomor Whatsapp" class="w-full mt-8" />

              <vs-input icon-pack="feather"  v-model="dataGreeting" name="item-greeting" icon="icon-briefcase" label-placeholder="Whatsapp Greeting" class="w-full mt-8" />

              <vs-input icon-pack="feather"  v-model="dataJarak" name="item-jarak" icon="icon-briefcase" label-placeholder="Maksimal Jarak Kirim" class="w-full mt-8" />

              <label class="text-sm mt-8 mb-3 flex">Whatsapp Checkout</label>
              <vs-radio v-model="shiping" color="success" class="mr-5" vs-value="free">Free</vs-radio>
              <vs-radio v-model="shiping" color="success" class="mr-5" vs-value="flat">Flat</vs-radio>
              <vs-radio v-model="shiping" color="success" class="mr-5" vs-value="radius">Radius</vs-radio>
              <vs-radio v-model="shiping" color="success" class="mr-5" vs-value="rajaongkir">Rajaongkir</vs-radio>

              <vs-input icon-pack="feather" v-model="dataRata" name="item-rata" icon="icon-briefcase" label-placeholder="Biaya Kirim Sama Rata" class="w-full mt-8" />

              <vs-input icon-pack="feather" v-model="dataRadius" name="item-radius" icon="icon-briefcase" label-placeholder="Biaya Kirim Berdasarkan Radius" class="w-full mt-8" />

              <vs-input icon-pack="feather" v-model="dataFb" name="item-fb" icon="icon-briefcase" label-placeholder="Link Facebook Page" class="w-full mt-8" />

              <vs-input icon-pack="feather" v-model="dataIg" name="item-ig" icon="icon-briefcase" label-placeholder="Instagram Username" class="w-full mt-8" />
  </div>
</component>

<div class="flex flex-wrap items-center p-6" slot="footer">
  <vs-button class="mr-6" @click="submitData" :disabled="!isFormValid">Buat</vs-button>
  <vs-button type="border" color="danger" @click="isSidebarActiveLocal = false">Batal</vs-button>
</div>

Pelanggan.vue

<data-view-sidebar :isSidebarActive="addNewDataSidebar" @closeSidebar="toggleDataSidebar" :data="sidebarData" />

<vs-table ref="table" multiple v-model="selected" pagination :max-items="itemsPerPage" search :data="products">

  <div slot="header" class="flex flex-wrap-reverse items-center flex-grow justify-between">

    <div class="flex flex-wrap-reverse items-center">

      <!-- ACTION - DROPDOWN -->
      <vs-dropdown vs-trigger-click class="cursor-pointer mr-4 mb-4">

        <div class="p-4 shadow-drop rounded-lg d-theme-dark-bg cursor-pointer flex items-center justify-center text-lg font-medium w-32">
          <span class="mr-2">Actions</span>
          <feather-icon icon="ChevronDownIcon" svgClasses="h-4 w-4" />
        </div>

        <vs-dropdown-menu>

          <vs-dropdown-item>
            <span class="flex items-center">
              <feather-icon icon="TrashIcon" svgClasses="h-4 w-4" class="mr-2" />
              <span>Delete</span>
            </span>
          </vs-dropdown-item>

          <vs-dropdown-item>
            <span class="flex items-center">
              <feather-icon icon="FileIcon" svgClasses="h-4 w-4" class="mr-2" />
              <span>Print</span>
            </span>
          </vs-dropdown-item>

        </vs-dropdown-menu>
      </vs-dropdown>

      <!-- ADD NEW -->
      <div class="p-3 mb-4 mr-4 rounded-lg cursor-pointer flex items-center justify-between text-lg font-medium text-base text-white bg-primary" @click="addNewData">
          <feather-icon icon="PlusIcon" svgClasses="h-4 w-4" />
          <span class="ml-2 text-base text-white">Tambah Pelanggan</span>
      </div>

    </div>


    <!-- ITEMS PER PAGE -->
    <vs-dropdown vs-trigger-click class="cursor-pointer mb-4 mr-4">
      <div class="p-4 border border-solid d-theme-border-grey-light rounded-full d-theme-dark-bg cursor-pointer flex items-center justify-between font-medium">
        <span class="mr-2">{{ currentPage * itemsPerPage - (itemsPerPage - 1) }} - {{ products.length - currentPage * itemsPerPage > 0 ? currentPage * itemsPerPage : products.length }} of {{ queriedItems }}</span>
        <feather-icon icon="ChevronDownIcon" svgClasses="h-4 w-4" />
      </div>
      <!-- <vs-button class="btn-drop" type="line" color="primary" icon-pack="feather" icon="icon-chevron-down"></vs-button> -->
      <vs-dropdown-menu>

        <vs-dropdown-item @click="itemsPerPage=4">
          <span>4</span>
        </vs-dropdown-item>
        <vs-dropdown-item @click="itemsPerPage=10">
          <span>10</span>
        </vs-dropdown-item>
        <vs-dropdown-item @click="itemsPerPage=15">
          <span>15</span>
        </vs-dropdown-item>
        <vs-dropdown-item @click="itemsPerPage=20">
          <span>20</span>
        </vs-dropdown-item>
      </vs-dropdown-menu>
    </vs-dropdown>
  </div>

  <template slot="thead">
    <vs-th>Gambar</vs-th>
    <vs-th sort-key="namapeg">Nama Pelanggan</vs-th>
    <vs-th sort-key="hp">No HP</vs-th>
    <vs-th sort-key="email">Email</vs-th>
    <vs-th sort-key="long">Longitude</vs-th>
    <vs-th sort-key="lat">Latitude</vs-th>
    <vs-th sort-key="jk">Jenis Kelamin</vs-th>
    <vs-th sort-key="jk">Tanggal Lahir</vs-th>
    <vs-th sort-key="jk">Tanggal Lahir</vs-th>
    <vs-th>Action</vs-th>
  </template>d

  <template slot-scope="{data}">
    <tbody>
      <vs-tr :data="tr" :key="indextr" v-for="(tr, indextr) in data">

        <vs-td class="img-container">
          <img :src="tr.img" class="product-img" />
        </vs-td>

        <vs-td>
          <p class="product-name font-medium truncate">{{ tr.namapeg }}</p>
        </vs-td>

        <vs-td>
          <p class="product-category">{{ tr.hp }}</p>
        </vs-td>

        <vs-td>
          <p class="product-category">{{ tr.jabatan }}</p>
        </vs-td>

        <vs-td>
          <vs-chip :color="getJumlahColor(tr.jumlah)" class="product-jumlah">{{ tr.jumlah | title }}</vs-chip>
        </vs-td>

        <vs-td>
          <p class="product-price">IDR{{ tr.price }}</p>
        </vs-td>

        <vs-td class="whitespace-no-wrap">
          <feather-icon icon="EditIcon" svgClasses="w-5 h-5 hover:text-primary stroke-current" @click.stop="editData(tr)" />
          <feather-icon icon="TrashIcon" svgClasses="w-5 h-5 hover:text-danger stroke-current" class="ml-2" @click.stop="deleteData(tr.id)" />
        </vs-td>

      </vs-tr>
    </tbody>
  </template>
</vs-table>
Sep
22
1 month ago
Activity icon

Started a new Conversation How To Create Multiple Upload Files With 2 Input File

I will create multiple upload file with 2 input file but i don't know

Fields.blade.php

<div class="form-group col-sm-6" id="cover">
 {!! Form::label('cover', 'Cover:') !!}
 {!! Form::file('cover', null, ['class' => 'form-control']) !!}
</div>
<div class="form-group col-sm-6" id="full">
 {!! Form::label('full', 'Full:') !!}
 {!! Form::file('full', null, ['class' => 'form-control']) !!}
</div>

CatalogController.php

public function createWithCategory($id)
    {
        $katalog_metadata = \App\Models\KatalogMetadata::with('metadata')
        ->where('category_id',$id)->get();
        return view('catalogs.create')
        ->with('katalog_metadata',$katalog_metadata)
        ->with('category_id',$id);
    }
public function store(CreateCatalogRequest $request)
    {
        $input = $request->all();
        if (\Auth::user()->can('isAdmin')) {
            $input['status'] = 1 ;
        }else{
            $input['status'] = 0 ;
        }
$input['cover'] = $this->uploadingCover($request);
$input['full'] = $this->uploadingFull($request);
$catalog = $this->catalogRepository->create($input);
foreach ($input['metadata'] as $key => $value) {
         $val = [
            'metadata_id'=>$key,
            'metadata_key'=>$value['key'],
            'value'=>$value['value'],
            'catalog_id'=>$catalog->id
           ];
$data = new \App\Models\CatalogMetadataValue($val);       
$catalog->catalog_metadata_value()->save($data);
        }
if (! \Auth::user()->can('isAdmin')) {
            $admin = \App\Models\User::where('role_id','1')->first();
            Mail::to($admin->email)->send(new NotifyNewCatalog($catalog));
        } 
Flash::success('Catalog saved successfully.');
return redirect(route('catalogs.index_with_category',$request->category_id));
    }`protected function uploadingCover($request)
    {
       $destinationPath = 'catalog/cover';
       if(! is_dir($destinationPath)) {
       if(! is_dir('catalog')){
             mkdir('catalog');
            }
        mkdir($destinationPath);
        }
if($request->hasFile('cover')) {
   $file = $request->file('cover');
   $fileName = time() . '.' .$file->getClientOriginalExtension();
   $file->move($destinationPath, $fileName);
 return $destinationPath . '/' . $fileName;
        }
return;
    }
protected function uploadingFull($request){
    $destinationPath = 'catalog/full';
    if(! is_dir($destinationPath)) {
      if(! is_dir('catalog')){
        mkdir('catalog');}
        mkdir($destinationPath);}
    if($request->hasFile('full')) {
       $file = $request->file('full');
       $fileName = time() . '.' . $file->getClientOriginalExtension();
       $file->move($destinationPath, $fileName);
     return $destinationPath . '/' . $fileName;
    }
    return;
    }`

Thanks

May
15
5 months ago
Activity icon

Started a new Conversation Modal Laravel With Ajax

My Controller

public function editRequest(Request $request, $id) {

    $user = $request->user();
    $order = Orders::where('order_id', $id)->first();
    $insertRequest = Orders::where('order_id', $id)->update(['request' => $request->input('request')]);
    if($insertRequest) {
    $users = User::all();
    Notification::send($users, new addedRequest($user, $order));

    $response['ping'] = 200;
    } else {
    $response['ping'] = 500;
    }
    return json_encode($response);
}
public function viewRequest($id) {
    $viewRequest = Orders::where('order_id', $id)->get();
    return response()->json($viewRequest);
}

My route

     Route::post('{id}/edit-request', '[email protected]')->name('editRequest');
    Route::get('{id}/view-request', '[email protected]')->name('viewRequest');

My Button

Request

    <button class="btn btn-outline-primary col-md-12" data-toggle="modal"
         data-target="#modalRequest" id="addRequest">Request</button>

My Modal

            <p>Tambahkan Request disini</p>
            <div class="form-group">
                <textarea id="notes"></textarea>
            </div>
        </div>
        <div class="modal-footer bg-whitesmoke br">
            <button type="button" class="btn btn-outline-danger" data-dismiss="modal">Cancel</button>
            <button type="button" onclick="sendRequest()" class="btn btn-outline-primary">Save changes</button>
        </div>

My Ajax

public function editRequest(Request $request, $id) {

    $user = $request->user();
    $order = Orders::where('order_id', $id)->first();
    $insertRequest = Orders::where('order_id', $id)->update(['request' => $request->input('request')]);
    if($insertRequest) {
    $users = User::all();
    Notification::send($users, new addedRequest($user, $order));
    $response['ping'] = 200;
    } else {
    $response['ping'] = 500;
    }
    return json_encode($response);
}

public function viewRequest($id) {
    $viewRequest = Orders::where('order_id', $id)->get();

    return response()->json($viewRequest);
}
May
12
5 months ago
Activity icon

Started a new Conversation Include Total Javascript To Controller

I Will Send +totalSemua to controller

totalHarga[count] = totalItem;
// loop value in object and sum all
var totalSemua = 0;
for (const key in totalHarga) {
    if (isNaN(totalHarga[key])) {
        totalSemua = totalSemua + 0;
    } else {
        totalSemua += parseInt(totalHarga[key]);
    }
}
totals[count] = obj;
$('#totalOrder').text('Rp. '+totalSemua);

}