donpuerto

donpuerto

Backend Programmer at Davao City

Member Since 3 Years Ago

Davao City

Experience Points
18,450
Total
Experience

1,550 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
174
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 4
18,450 XP
14 Jun
2 years ago

donpuerto left a reply on Vue, Mix And JQuery Modules When $(document).ready()

@envision yeah i split it up... and it works...

16 Mar
2 years ago

donpuerto left a reply on Vue, Mix And JQuery Modules When $(document).ready()

What about if i have jquery plugins required to put on the header?

21 Feb
2 years ago

donpuerto started a new conversation Laravel Package For WIndows 10 Notification

Do we have that package for laravel?

18 Feb
2 years ago

donpuerto left a reply on Creating API Using Laravel

Actually there many tutorials available on youtube... If you familiar on Vue JS, then you will able to solve your problem.

https://www.youtube.com/playlist?list=PL3ZhWMazGi9IommUd5zQmjyNeF7s1sP7Y

Accessing Laravel as your backend you need to know CORS and Laravel Passport.

https://www.codecourse.com/lessons/api-development-with-laravel (I also recommend this series, you learn alot from here)

Grab the concept and apply to your mobile and Laravel application.

Goodluck...

12 Feb
2 years ago

donpuerto started a new conversation Vue Js Serverless Hosting Site

Any recommendation?
08 Feb
2 years ago
05 Feb
2 years ago

donpuerto left a reply on Amazon SQS. Jobs Pushing To Queue, But Not Processing

I have also tried SQS, all above suggested solution doesnt work.

26 Jan
2 years ago

donpuerto left a reply on Does Anyone Hava A Problem On Webpack (Laravel Mix)?

maybe we have to wait into next stable version...

24 Jan
2 years ago

donpuerto started a new conversation Does Anyone Hava A Problem On Webpack (Laravel Mix)?

Laravel mix is awesome, but i had a problem on compilation. Vue component does not compile. I tried to delete the Public JS folder and re run npm watch... and it did not compile. At first fresh install was working okay.

23 Jan
2 years ago

donpuerto left a reply on Homestead Hangs At SSH Auth Method: Private Key

Just recently installed and got error similar above

Bringing machine 'homestead-7' up with 'virtualbox' provider...
==> homestead-7: Importing base box 'laravel/homestead'...
==> homestead-7: Matching MAC address for NAT networking...
==> homestead-7: Checking if box 'laravel/homestead' is up to date...
==> homestead-7: Setting the name of the VM: homestead-7
==> homestead-7: Clearing any previously set network interfaces...
==> homestead-7: Preparing network interfaces based on configuration...
    homestead-7: Adapter 1: nat
    homestead-7: Adapter 2: hostonly
==> homestead-7: Forwarding ports...
    homestead-7: 80 (guest) => 8000 (host) (adapter 1)
    homestead-7: 443 (guest) => 44300 (host) (adapter 1)
    homestead-7: 3306 (guest) => 33060 (host) (adapter 1)
    homestead-7: 5432 (guest) => 54320 (host) (adapter 1)
    homestead-7: 22 (guest) => 2222 (host) (adapter 1)
==> homestead-7: Running 'pre-boot' VM customizations...
==> homestead-7: Booting VM...
==> homestead-7: Waiting for machine to boot. This may take a few minutes...
    homestead-7: SSH address: 127.0.0.1:2222
    homestead-7: SSH username: vagrant
    homestead-7: SSH auth method: private key
Virtual Box
Version 5.1.14 r112924 (Qt5.6.2)

Vagrant
1.9.1
### I followed below procedure got no luck


I had the same problem on macOS 10.12 today, and lost 6 hours trying to find a fix. Finally, after several reinstallations, reboots, and trial and error, I somehow got it to work by following these steps...

Completely uninstall and reinstall Vagrant, VirtualBox, and Homestead.
Ensure the homestead-7 box is shut down within the VirtualBox UI
Right-click the homestead-7 box, and choose Settings
Click 'Network'
Under 'Adapter 1', which should be attached to NAT, click 'Advanced'
Tick the box beside 'Cable Connected'
Save settings, and reprovision Homestead with vagrant up --provision
Run vagrant reload --provision to reprovision the machine
18 Jan
2 years ago

donpuerto left a reply on Vue Router 2 Wait For Data When Refreshing

Forget the props, use vuex...

10 Jan
2 years ago

donpuerto started a new conversation Best Vue CLI Template That You Recommend

I'm looking for VUE CLI template that has already..
- Vue Router
- Vuex Setup
- Axios
- Html framework (Either Bulma or Bootstrap)
- etc...

A complete package similar nuxt.js.

Any recommendation?

14 Dec
2 years ago

donpuerto started a new conversation JSON Error On Props Undefined Property

component

 <pages :paginated-pages="meta">
</pages>

im passing an object to meta

<script type="text/babel">
    import pages from '../components/Pages.vue'
    export default {
    components: {
        pages
    },
        data () {
            return {
                  topics: [],
                  meta: null
            }

        },
        methods: {
            getTopics (page) {
                this.$http.get('/topics?page=' + page)
                    .then((response) => {
                        this.topics = response.body.data
                        this.meta = response.body.meta
                        console.log('Topics',  this.meta)

                    });
            },
        },
        created () {
            this.getTopics(1)
        },
        mounted() {
            console.log('Component Topics mounted.')
        }
    }
</script>

meta object, that was passed to pages component

{
  "pagination": {
    "total": 105,
    "count": 10,
    "per_page": 10,
    "current_page": 1,
    "total_pages": 11,
    "links": {
      "next": "http://laravel-vue-pagination.dev/topics?page=2"
    }
  }
}

pages component, checking and printing the object and works perfectly as seen above but...

<template>
    <div>            
    <pre>
                {{ paginatedPages }}
    </pre> 
    </div>
</template>
<script>
    export default {
        props: ['paginatedPages'],
        mounted () {
              console.log('Component page mounted.')
              console.log("Paginated Pages: ", this.paginatedPages)
        }
    }
</script>

but... when i try this below, it incurr an error which unidentify "pagination" property.

what the heck is going on?

<template>
    <div>
    
            <pre>
                {{ paginatedPages.pagination}}
            </pre>
            
 
    </div>


</template>
20 Nov
2 years ago

donpuerto left a reply on Share Data Between Components

global emit and bus is the best and simple way than Vuex

12 Nov
2 years ago

donpuerto left a reply on Interaction Between Parent And Child Components

Im not going to give you a code but a walkthrough maybe. Here i is.

  • Passing objects/string from parent to child you can use props. Aside from that there also validation. You can check that on the documentation.
  • Passing objects/string from child to parent (3 ways) 1. using $on and $emit, 2. using bus $on and $emit, 3) Vuex
  • using $on and $emit
<div id="counter-event-example">
 <p>{{ total }}</p>
 <button-counter v-on:increment="incrementTotal"></button-counter>
 <button-counter v-on:increment="incrementTotal"></button-counter>
</div

Vue.component('button-counter', {
 template: '<button v-on:click="increment">{{ counter }}</button>',
 data: function () {
   return {
     counter: 0
   }
 },
 methods: {
   increment: function () {
     this.counter += 1
     this.$emit('increment')
   }
 },
})
new Vue({
 el: '#counter-event-example',
 data: {
   total: 0
 },
 methods: {
   incrementTotal: function () {
     this.total += 1
   }
 }
})

donpuerto started a new conversation How To Make Your Vue-resource Reactive After Call?

  • Im having trouble on what way to get my data reactive.
  • Im trying to delete a record. Yes its working, but the problem how i am going to refresh the table using vue js reactivity.
  • On documentation says by using Vue.set() or Vue.nextTick(), but i dont know how to use it on my case?
onDeleteContact(id){
               var vm = this;
                this.$http({url: '/api/contacts/'+id, method: 'delete'})
                        .then(function (response) {
                            if(response.status === 200){
                                   //this.$set(vm,this.$parent.contacts,response.body.updatedContacts);
                             }

                 })
},
10 Nov
2 years ago

donpuerto left a reply on How To Declare Global Variable Using Vue CLI Template

@maitrefrantz Hi mate, can you show m how to write config file?

donpuerto started a new conversation How To Declare Global Variable Using Vue CLI Template

I want these variables to be available in a component and to its sub component. Any idea everyone? thanks

var firebase = require('firebase')
// Initialize Firebase
var config = {
    apiKey: "AIzaSyD0mwJPOZTK9oS5lyQqHoBPxwVQHkbs",
    authDomain: "vuefirebasedemo.firebaseapp.com",
    databaseURL: "https://vuefirebasedemo.firebaseio.com",
    storageBucket: "vuefirebasedemo.appspot.com",
    messagingSenderId: "670332486376"
};

firebase.initializeApp(config);
var db = firebase.database()

Error

Uncaught Error: Firebase App named '[DEFAULT]' already exists.
08 Nov
2 years ago

donpuerto left a reply on It Is Possible To Have Two Compiled Webpack?

@prasinoulhs but you compiled as one JS. I want 2 outputs as header and footer js.

07 Nov
2 years ago

donpuerto left a reply on It Is Possible To Have Two Compiled Webpack?

@prasinoulhs Okay sounds cool. Is this will compile?

header.js

/*Global Varaiables*/
var $app = {
    csrfToken: "{{  csrf_token() }}",
    type: ['GET','POST','PUT','PATCH','DELETE' ],
};
//window.csrfTokenForVue = $app.csrfToken;

window._ = require('lodash');
window.$ = window.jQuery = require('jquery');
require('./plugins/parallax.min');
require('./plugins/royal_preloader.min');
require('./plugins/royal_preloader_config');
require('./plugins/jquery-main-js-libraries');

Elixir

Elixir.webpack.mergeConfig({
        entry: {
            'app': jsDir + 'app.js',
            'app2': jsDir + 'app2.js',
            'app3' : jsDir + 'app3.js'
        },
        output: {
            path: __dirname + '/public/js/',
            filename: 'header.js'
        }
    });

donpuerto started a new conversation It Is Possible To Have Two Compiled Webpack?

I need to split the jquery component at the header section in order to run my jquery plugin. As by default it integrated on one webpack.

elixir(mix => {
    mix.styles([
        'royal_preloader.css',
        'bootstrap.min.css',
        'ionicons.min.css',
        'pe-icon-7-stroke.css',
        'magnific-popup.css',
        'logoiconfont.css',
        'style.css',
    ], 'public/css/app.css')

    .webpack('header.js')
    .webpack('footer.js')
    .version(['css/app.css', 'js/footer.js','js/header.js']);
});

Can someone tell me what is the best practice?

01 Nov
2 years ago

donpuerto left a reply on Vue 2 Tutorials Request

@starmatt for me the videos is outdated. I tried version 1 and 2, it has really big difference. So i believe those videos need to be updated too. But its not as huge as angular 1 and 2. You will see the difference because i tried in both version just had obstacle along the way.

31 Oct
2 years ago

donpuerto started a new conversation Vuex Todo App By Paul Adams

main.js

import Vue from 'vue'
import App from './App.vue'
import store from './store/store'

new Vue({
  el: '#app',
  store,
  render: h => h(App)
})

App.Vue

<template>
  <div class="container">
    <CompletedTodos></CompletedTodos>
    <GetTodo></GetTodo>
    <CurrentTodos></CurrentTodos>
  </div>
</template>

<script>
import GetTodo from './components/GetTodo.vue'
import CurrentTodos from './components/CurrentTodos.vue'
import CompletedTodos from './components/CompletedTodos.vue'
export default {
  components: {
    GetTodo,
    CurrentTodos,
    CompletedTodos
  }
 
}
</script>

<style>
body {
  font-family: Helvetica, sans-serif;
}
</style>

store.js

import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
    state: {
        todos: [],
        newTodo: ''
    },

    mutations: {
        GET_TODO(state, todo){
            state.newTodo =  todo
        },
        ADD_TODO(state){
            state.todos.push({
                body: state.newTodo,
                completed: false
            })
        },
        EDIT_TODO(state, todo){
            var todos = state.todos
            todos.splice(todos.indexOf(todo), 1)
            state.todos = todos
            state.newTodo = todo.body
        },
        REMOVE_TODO(state, todo){
            var todos = state.todos
            todos.splice(todos.indexOf(todo), 1)
            
        },
        COMPLETE_TODO(state, todo){
            todo.completed = !todo.completed
        },
        CLEAR_TODO(state){
            state.newTodo = ''
        }
    },
    actions: {
        getTodo({commit}, todo){
            commit('GET_TODO', todo)
        },

        addTodo({commit}){
            commit('ADD_TODO')
        },
        editTodo({commit}, todo){
            commit('EDIT_TODO', todo)
        },
        removeTodo({commit}, todo){
            commit('REMOVE_TODO', todo)
        },
        completeTodo({commit}, todo){
            commit('COMPLETE_TODO', todo)
        },
        clearTodo({commit}){
            commit('CLEAR_TODO')
        }

    },
    getters: {
        newTodo: state => state.newTodo,
        todos: state => state.todos.filter((todo) => {return !todo.completed}),
        completedTodos: state => state.todos.filter((todo) => {return todo.completed})
    }

})

GetTodo Component

<template>
    <div id="get-todo" class="container">
        <input class="form-control"
               :value="newTodo"
               @change="getTodo"
               placeholder="I need to...">
        <button class="btn btn-primary" @click="addTodo">Add Todo</button>
    </div>
</template>
<script>
    export default{
        methods: {
            getTodo(e){
                this.$store.dispatch('getTodo', e.target.value)

            },
            addTodo(){
                this.$store.dispatch('addTodo')
                this.$store.dispatch('clearTodo')
            }
        },
        computed: {
            newTodo(){
                return this.$store.getters.newTodo
            }
        }

    }
</script>

CurrentTodos.vue Component

<template>
    <div id="current-todos" class="container">
        <h3 v-if="todos.length > 0">Current({{todos.length}})</h3>
        <ul class="list-group">
            <li class="list-group-item" v-for="todo in todos">
                {{todo.body}}
            <div class="btn-group">
                <button type="button" @click="edit(todo)" class="btn btn-default btn-sm">
                <span class="glyphicon glyphicon-edit"></span> Edit
                </button>
                <button type="button" @click="complete(todo)" class="btn btn-default btn-sm">
                <span class="glyphicon glyphicon-ok-circle"></span> Complete
                </button>
                <button type="button" @click="remove(todo)" class="btn btn-default btn-sm">
                <span class="glyphicon glyphicon-remove-circle"></span> Remove
                </button>
            </div>
            </li>
        </ul>
    </div>
</template>
<script>
export default{
    methods: {
        edit(todo){
            this.$store.dispatch('editTodo', todo)
        },
        complete(todo){
            this.$store.dispatch('completeTodo', todo)
        },
        remove(todo){
            this.$store.dispatch('removeTodo', todo)
        }
    },
    computed: {
        todos(){
            return this.$store.getters.todos
        }
    }
}
</script>
<style>
    .btn-group{
        float: right;
    }
</style>

CompletedTodos.vue

<template>
    <div id="completed-todos">
        <h3 v-if="completed.length > 0">Completed({{completed.length}})</h3>
        <ul class="list-group">
            <li class="list-group-item" v-for="todo in completed">
                {{todo.body}}
                <button type="button" @click="remove(todo)" class="btn btn-default btn-sm">
                <span class="glyphicon glyphicon-remove-circle"></span> Remove
                </button>
            </li>
        </ul>

    </div>
</template>

<script>
    export default{
        methods: {
            remove(todo){
                this.$store.dispatch('removeTodo', todo)
            }
        },
        computed: {
            completed(){
                return this.$store.getters.completedTodos
            }
        }
    }
</script>

Github Source File

30 Oct
2 years ago

donpuerto started a new conversation Vue 2 Tutorials Request

@jeffreyway Can we have a tutorial for VUE. Vue documentaion for me not really good so far. Its like a puzzle :) Please include the following :)

-Basic of course
-components (Non Parent-Child Communication)
-Vuex
-Render
-Vue CLI
-Custom Directives
-and Deployment For Production (Can we use forge? or just a hosting server? or firebase application?)

Objective here is to be able to create a standalone SPA website connecting to Laravel or Firebase

thank you.

26 Oct
2 years ago

donpuerto left a reply on How To Upload Vue SPA Application?

@maitrefrantz Im looking for Digital Ocean and Forge. Is just the same way as Laravel Project?

donpuerto left a reply on How To Upload Vue SPA Application?

@maitrefrantz, thanks man, do you link for tutorials or documentation?

25 Oct
2 years ago

donpuerto started a new conversation How To Upload Vue SPA Application?

How to upload Vue SPA application? Can we use forge to do that or just shared hosting site?

donpuerto left a reply on Vue Is Not Defined! $ Is Not Defined! What Am I Doing Wrong?

@LJ90 This is awesome mate. Thanks alot. I was able to communicate data from child to parent or component to component using emit and v-on. However, i felt it is very awkward flow, while reading some documentation Vuex probably would fit my need.

Vue is amazing probably, but the main problem was lack of documentation and resources. I even watch spanish and french youtube video just to look for an answer. Its really terrible.

24 Oct
2 years ago

donpuerto left a reply on Vue Is Not Defined! $ Is Not Defined! What Am I Doing Wrong?

@LJ90 yes, thanks mate. Do you have vue js Non Parent-Child Communication. I want to pass an object from component to other component. Yes, there is an example but its not really clear.

23 Oct
2 years ago

donpuerto left a reply on Vue Is Not Defined! $ Is Not Defined! What Am I Doing Wrong?

@calebporzio Can i as a question sir? how can i mixed a code using Jquery and Vue. Im using Laravel 5.3. Thanks.

01 Oct
2 years ago

donpuerto started a new conversation Laragon Is The Best Option For Windows Users Out There Than Homestead.

I tried Laragon just today and i say "WOW". Quick build in a minute without setting the host file and homestead.yaml. And not all, i tried also to publicize into the web using ngrok.

Homestead, bye2x. ;)

30 Aug
3 years ago

donpuerto started a new conversation Laravel Mailable Firing Twice

Its really weird mail fired twice.

## Route
use App\Mail\Newsletter;
Route::get('newsletter', function () {
    $contact = App\Contact::findorfail(1);

    $email = new Newsletter($contact);
    Mail::to($contact->email,$contact->name)
        ->cc('[email protected]','Jane Doe')->cc('[email protected]','Jane Doe')
        ->bcc('[email protected]', 'Admin Account')->bcc('[email protected]', 'Accounting Acount')
        ->send($email);

    return view('emails.thank-you-email-page');
});
##  Build
 return $this->view('emails.newsletter')
                    ->text('emails.newsletter')
                    ->subject('Newsletter');
## Also, i noticed multiple "to", "cc"," bcc" not working. It will read only the last one.
02 Aug
3 years ago

donpuerto left a reply on Laravel To Mobile App (Android/IOS Platform)

@poorcoder thanks mate checking on this

19 Jul
3 years ago

donpuerto started a new conversation Bluff Route

it is possible to have bluff route?

//Internal only
Route::get('/original', function(){

});

//On browser side
//Instead it display original it create a dummy bluff
http://www.mywebsite/bluff.com
09 Jul
3 years ago

donpuerto started a new conversation Laravel And Android Apps As One Database?

I was wondering if we can use one database for Laravel and Android Apps. If there is what type of Android platform it is.

As i checked no documentation related to database connection. https://www.fusetools.com/

26 Jun
3 years ago

donpuerto left a reply on Laravel 5.3 Wish List

-Scaffolding for Roles and Permission like make:auth -Built in packages for SMS like twilio

15 Jun
3 years ago

donpuerto left a reply on How To Send Response And Redirect At The Same Time

@spekkionu thanks for your response. Is this the way you refresh your table? Im using bootstrap table only.

14 Jun
3 years ago

donpuerto started a new conversation How To Send Response And Redirect At The Same Time

I want to send reponse after ajax post and at the same time redirect using laravel to a page where it refresh our table. Can we do chaining or what?

Thanks and advance.

donpuerto left a reply on Brackets Cant Be Put As A Variable

@veve286 that's not possible mate.

donpuerto left a reply on Brackets Cant Be Put As A Variable

@rch I'm using js/jquery language not php.

donpuerto left a reply on Brackets Cant Be Put As A Variable

@zachleigh normal form needs token

 <input type="hidden" name="_token" value="{{ csrf_token() }}">

So, storing this into js variable still the same problem ;)

donpuerto started a new conversation Brackets Cant Be Put As A Variable

I tried to create a form and store as a variable, but on runtime it did not work, any alternative?

var strFormAddNewRecord="";
    strFormAddNewRecord += "{!! Form::open(array('id' => 'addNewRecordsForm', 'role' => 'form')) !!}";
    strFormAddNewRecord += "        <div class=\"form-group\">";
    strFormAddNewRecord += "            <label for=\"name\">Name:<\/label>";
    strFormAddNewRecord += "            <input type=\"text\" class=\"form-control\" name=\"name\" id=\"name\">";
    strFormAddNewRecord += "        <\/div>";
    strFormAddNewRecord += "        <div class=\"form-group\">";
    strFormAddNewRecord += "            <label for=\"address\">Address:<\/label>";
    strFormAddNewRecord += "            <textarea class=\"form-control\" rows=\"5\" id=\"address\" name=\"address\"><\/textarea>";
    strFormAddNewRecord += "        <\/div>";
    strFormAddNewRecord += "        <div class=\"form-group\">";
    strFormAddNewRecord += "            <label for=\"phone\">Phone:<\/label>";
    strFormAddNewRecord += "            <input type=\"text\" class=\"form-control\" name=\"phone\" id=\"phone\">";
    strFormAddNewRecord += "        <\/div>";
    strFormAddNewRecord += "        <div class=\"form-group\">";
    strFormAddNewRecord += "            <label for=\"email\">Email<\/label>";
    strFormAddNewRecord += "            <input type=\"email\" class=\"form-control\" name=\"email\" id=\"email\">";
    strFormAddNewRecord += "        <\/div>";
    strFormAddNewRecord += "    {!! Form::close() !!}";
23 May
3 years ago

donpuerto started a new conversation Suggestion: Its Really Nice Laravel Do Have Extensions Or Componets Built It To Use.

Its nice to have official built in components like Search Clients, Calendars, and other components. With simple command line you can able to install it. Its like VB.net everything is there, simple drag and drop.

20 May
3 years ago

donpuerto left a reply on How To Call PHPExcel's Native Methods Within Maatwebsite?

@bobbybouwmann as you can see the above code, i tried to mixed the native phpexcel and Maatwebsite. When i tried to run native phpexcel on Maatwebsite, it dont run. Is there way to mixed it up?

        //Not working
        $objPHPExcel = new PHPExcel();
        $objPHPExcel->setActiveSheetIndex(0);
        $objPHPExcel->getActiveSheet()->setCellValue('A2', 'PhpExcel Demo');

donpuerto started a new conversation How To Call PHPExcel's Native Methods Within Maatwebsite?

I tried this code, but fail to work. Any suggestion?


public function export($type){
    $data=[];
    return Excel::create('Laravel Excel Sheet', function($excel) use ($data) {
                //Yes working
        $sheet->cell('A1', function($cell) {
            $cell->setValue('Maatwebsite Demo');
        }
                //Not working
        $objPHPExcel = new PHPExcel();
        $objPHPExcel->setActiveSheetIndex(0);
        $objPHPExcel->getActiveSheet()->setCellValue('A2', 'PhpExcel Demo');

    })->download($type);
}