ipewds

ipewds

Member Since 2 Years Ago

Experience Points 720
Experience Level 1

4,280 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 Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    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 Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

01 Jun
11 months ago

ipewds started a new conversation Laravel Excel 3.0 How To Change Header Background Color

Hi guys I have no idea how to design rows in the new Laravel Excel 3.0 can't find any docs on there website on how to achieve this.

22 May
1 year ago

ipewds left a reply on Hi Guys I Am Having Trouble Sending A Excel File To Email.

It's giving me this

Unable to open file for reading [PK�h�LG�D�X�[Content_Types].xml��MN�0���"�%nY ��vAa �(0����ؖg�w{&i �@�nbE�{�y��d۸l m����X�(��)���F��;@1_�����c)j�x/%��E��y� �QĿi!

ipewds started a new conversation Hi Guys I Am Having Trouble Sending A Excel File To Email.

I am using this https://laravel-excel.maatwebsite.nl/docs/3.0/getting-started/basics library for generating excel file. Now I made this work before with there previous version but they currently upgraded to version 3.0 and I can't seem to find a way to send the generated excel file.

This is not working...

    `Excel::store(new HourlyExport(), 'test.xlsx', 'reports');
    $file = Storage::disk('reports')->get('test.xlsx');
    Mail::raw('Report', function ($message) use ($file) {
        $message->to('[email protected]')
            ->attach($file)
            ->subject('Hourly Report')
            ->from('[email protected]', 'APP')
            ->replyTo('[email protected]', 'APP');
    });`

any ideas?

19 Apr
1 year ago

ipewds left a reply on Is Encrypt() Really Secure?

@Cronix Thank you man I had that as my theory but needed some answers. hehe

18 Apr
1 year ago

ipewds started a new conversation Is Encrypt() Really Secure?

Hi guys I'm having this doubt on encrypt() method of laravel. Is it actually secure? I mean you can just decrypt() the encrypted data into a fresh laravel project (have not done it yet though) or any laravel project. How is it secure? does it only decrypt to the app where it is encrypted or something? just a random question here.

ipewds left a reply on How To Store A File To My Application Storage From A Different Server Using Via Url Response With Guzzle.

Nevermind found the issue it was http:// it needs to be there.

ipewds left a reply on How To Store A File To My Application Storage From A Different Server Using Via Url Response With Guzzle.

foreach ($scripts as $script) { $script = new Script([ 'name' => $script->name, 'slug' => $script->slug, 'file' => $script->live_script, "last_sync" => Carbon::now() ]); $script->save(); $url = env('MASTER_PORTAL_URL') . "/scripts/{$script->file}"; $this->info($url); $file = file_get_contents($url); Storage::disk('scripts')->put($script->file, $file); $this->info('Script generated ' . $script->slug); }

@Cronix this does not work but when I get the url output and do

$file = file_get_contents('someurl.com/somefolder/somifle.txt'); Storage::disk('scripts')->put($script->file, $file);

This one works.

ipewds left a reply on How To Store A File To My Application Storage From A Different Server Using Via Url Response With Guzzle.

Hi @Cronix this does work when I do it outside of loop but when I do it in a loop it returns a directory/file does not exist but when I use the url it's there.

17 Apr
1 year ago

ipewds started a new conversation How To Store A File To My Application Storage From A Different Server Using Via Url Response With Guzzle.

Hi guys I have this situation where I have a file in SERVER A and I want to copy that file to my SERVER B by using a get api i made in my SERVER A which returns a JSON data and I'm calling it using Guzzle. I haven't ran any tests yet but I want to ask you guys first if the download from laravel storage method will do the trick but take note I don't want to download the file I just want to copy it from server to server, the file should not be obtainable by the user.

25 Jan
1 year ago

ipewds started a new conversation What Eloquent Relationship Should I Use In This Case?

Hi guys, I'm really confused in which relationship I should use for this kind of data structure. To make everything understandable I have this script system where you make a section then you attach a question to that section and question has many options(answers) and every option has a target section to go to if a user clicks that option now that works and got that everything figured out. But I want to make question and options to be reusable from any sections but I can't do that because options target section must be different from every sections if that make sense. I'm just really confused in which is the best way to do it, I can do it dirty but I want to do it the best and clean way.

04 Oct
1 year ago

ipewds started a new conversation Laravel Is Returning Different Data Types In Axios With Same Code

I am really confused about my situation right now. As you can see I have this controller in laravel that separates the data from a collection by filtering the collection

$bankedQuestions = $questions->whereNotIn('id', $sortedQuestionsID)->all(); $sortedQuestions = $questions->whereIn('id', $sortedQuestionsID)->all(); Everything works great and it both returns an array, checked it using dd();

then, I return it as a json.

return response()->json([ 'message' => 'Question loaded', 'sortedQuestions' => $sortedQuestions, 'questions' => $bankedQuestions, 'sortedIDs' => $sortedQuestionsID, ]);

THEN the confusing part comes into place. When I check the axios response the data types are very very different.

https://i.stack.imgur.com/m6qiw.png

31 Jul
1 year ago

ipewds started a new conversation Laravel Latest 5.4 How To Implement Publish

I've been thinking about this for weeks now and can't seem to get a possible solution on how to implement a publishing feature? like in a wordpress page you need to publish the page so the changes will be reflected in the live website? How do you normally do this kind of functionality? I'm just confused because if I change the data in the database then it will affect the live site even though i'm still editing the page. Any tutorial or resources would be very dope. Thank you guys, Have a great day.

20 Jul
1 year ago

ipewds left a reply on Help, Can't Install Laravel Mix In Laravel Homestead.

Okay I managed to make it work. I edited my package.json files scripts into this:

"scripts": {
    "dev": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "watch": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "watch-poll": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --watch-poll --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "hot": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
    "production": "node node_modules/cross-env/dist/bin/cross-env.js NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
  },

Then I followed @bashy 's instruction then did a npm install cross-env and then a sudo npm install and it is now installed. But I noticed something though. When I run it in the terminal (homestead machine) it runs perfectly but in the windows machine (My local machine) it throws an error? why is it @bashy? is it because of the different file structure of my VM and WINDOWS? I did see a post somewhere about it while i was researching. Thank you so much @bashy for the help. I'll mark this closed now. I hope this thread will help anyone getting into this trouble with laravel homestead.

ipewds left a reply on Help, Can't Install Laravel Mix In Laravel Homestead.

It's still the same. @bashy :( I edited the .bashrc file and appended everything and ran npm config set prefix ~/.npm before running sudo npm install --no-bin-links but still gives me the same error. Did all your instructions but no luck.

ipewds left a reply on Help, Can't Install Laravel Mix In Laravel Homestead.

@bashy Just found it and edited it with the vi command. I'm installing npm for the hundredth time right now I hope this is it. Btw is it okay to run sudo with npm install though?

ipewds left a reply on Help, Can't Install Laravel Mix In Laravel Homestead.

@bashy I made a new file in my users folder (Local machine) named .bashrc and wrote this

export PATH="$PATH:$HOME/.npm/bin

Because I can't find it anywhere in my local. Where do I find .bashrc, .zshrc though? I know I may sound stupid right now but I can't really get my head over this npm installation. I'm really new to npm and the laravel mix itself.

ipewds left a reply on Help, Can't Install Laravel Mix In Laravel Homestead.

@Cronix I ran it inside the homestead ssh /Code/nameofproject. Am I doing it right?

ipewds left a reply on Help, Can't Install Laravel Mix In Laravel Homestead.

Hi @bashy this is what came up. It's still the same did what you said.

[email protected] MINGW64 /
$ homestead ssh
Welcome to Ubuntu 16.04.2 LTS (GNU/Linux 4.4.0-81-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

3 packages can be updated.
0 updates are security updates.


Last login: Thu Jul 20 16:17:39 2017 from 10.0.2.2
[email protected]:~$ cd Code
[email protected]:~/Code$ cd CCPortal
[email protected]:~/Code/CCPortal$ ls -al
total 746
drwxrwxrwx 1 vagrant vagrant   4096 Jul 20 16:30 .
drwxrwxrwx 1 vagrant vagrant   4096 Jul 20 16:27 ..
drwxrwxrwx 1 vagrant vagrant   4096 Jul 20 16:27 app
-rwxrwxrwx 1 vagrant vagrant   1646 Jul 20 14:14 artisan
drwxrwxrwx 1 vagrant vagrant      0 Jul 20 16:27 bootstrap
-rwxrwxrwx 1 vagrant vagrant   1300 Jul 20 14:14 composer.json
-rwxrwxrwx 1 vagrant vagrant 122432 Jul 20 14:14 composer.lock
drwxrwxrwx 1 vagrant vagrant   4096 Jul 20 16:27 config
drwxrwxrwx 1 vagrant vagrant   4096 Jul 20 16:27 database
-rwxrwxrwx 1 vagrant vagrant    572 Jul 20 14:16 .env
-rwxrwxrwx 1 vagrant vagrant    521 Jul 20 14:14 .env.example
-rwxrwxrwx 1 vagrant vagrant    111 Jul 20 14:14 .gitattributes
-rwxrwxrwx 1 vagrant vagrant    146 Jul 20 14:14 .gitignore
drwxrwxrwx 1 vagrant vagrant      0 Jul 20 16:27 .idea
-rwxrwxrwx 1 vagrant vagrant 386230 Jul 20 16:30 npm-debug.log
-rwxrwxrwx 1 vagrant vagrant   1063 Jul 20 14:14 package.json
-rwxrwxrwx 1 vagrant vagrant   1043 Jul 20 14:14 phpunit.xml
drwxrwxrwx 1 vagrant vagrant   4096 Jul 20 16:27 public
drwxrwxrwx 1 vagrant vagrant      0 Jul 20 16:27 resources
drwxrwxrwx 1 vagrant vagrant      0 Jul 20 16:27 routes
-rwxrwxrwx 1 vagrant vagrant    563 Jul 20 14:14 server.php
drwxrwxrwx 1 vagrant vagrant      0 Jul 20 16:27 storage
drwxrwxrwx 1 vagrant vagrant      0 Jul 20 16:27 tests
drwxrwxrwx 1 vagrant vagrant   4096 Jul 20 16:28 vendor
-rwxrwxrwx 1 vagrant vagrant    549 Jul 20 14:14 webpack.mix.js
-rwxrwxrwx 1 vagrant vagrant 213731 Jul 20 14:14 yarn.lock
[email protected]:~/Code/CCPortal$ npm config set prefix ~/.npm
[email protected]:~/Code/CCPortal$ npm install --no-bin-links
npm ERR! Linux 4.4.0-81-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "--no-bin-links"
npm ERR! node v6.11.1
npm ERR! npm  v3.10.10

npm ERR! Maximum call stack size exceeded
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /home/vagrant/Code/CCPortal/npm-debug.log
[email protected]:~/Code/CCPortal$

and I added a the file .bashrc in my user directory which is C:\Users\admin because .bashrc is nowhere to be found. Isn't because of my configuration? or should I do a SUDO?

ipewds left a reply on Help, Can't Install Laravel Mix In Laravel Homestead.

Do i run it in my VMachine? like in the homestead ssh? Anyway will try it. @bashy

ipewds left a reply on Help, Can't Install Laravel Mix In Laravel Homestead.

I'm really new to homestead, Is it because of homestead @bashy ? if I do this via wamp will it fix the error?

ipewds left a reply on Help, Can't Install Laravel Mix In Laravel Homestead.

@bashy what do you mean? I don't get the err message. Especially this one. npm ERR! Linux 4.4.0-81-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "--no-bin-links" npm ERR! node v6.11.1 npm ERR! npm v3.10.10

ipewds started a new conversation Help, Can't Install Laravel Mix In Laravel Homestead.

Hi guys, My installation keeps failing (been trying for 2 days now). I'm running sudo npm install --no-bin -links in a fresh laravel homestead install inside my linux VM (Virtual Box). If this will help you guys here is my package.json:

{ "private": true, "scripts": { "dev": "npm run development", "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", "watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", "watch-poll": "npm run watch -- --watch-poll", "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", "prod": "npm run production", "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" }, "devDependencies": { "axios": "^0.16.2", "bootstrap-sass": "^3.3.7", "cross-env": "^5.0.1", "jquery": "^3.1.1", "laravel-mix": "^1.0", "lodash": "^4.17.4", "vue": "^2.1.10" } }

and here is the error message:

npm ERR! Linux 4.4.0-81-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "--no-bin-links" npm ERR! node v6.11.1 npm ERR! npm v3.10.10

npm ERR! Maximum call stack size exceeded npm ERR! npm ERR! If you need help, you may report this error at: npm ERR! https://github.com/npm/npm/issues

npm ERR! Please include the following file with any support request: npm ERR! /home/vagrant/Code/ccportal/npm-debug.log

I hope you guys can help me on this one. I'm out of ideas, I don't know what to do been trying for 2 days. Already sent an issue on npm's github but they have no response. Is it something to do with my version of node and npm? Here is the details of my versions:

NPM Version: 3.10.10 NODE JS Version: 6.11.1

or is it because i'm running it the wrong way? or is it something to do with my package? or is it because of laravel homestead? I hope you guys respond. You guys are my last hope.

10 Dec
2 years ago

ipewds left a reply on Registration Working But Not Saving In Domain

Nevermind Solved it. My env was set to debug false and that's why it ain't throwing any error. and Also I removed the DB::beginTransaction and that fixed the problem on saving the data and my vendor folder was not pushed on github that's why it threw Class not found. Thanks btw.

ipewds left a reply on Registration Working But Not Saving In Domain

and the save controller

public function CreateNewCompanyAccount(Request $request) { $validator = Validator::make($request->all(), [ 'email' => 'required|email', 'name' => 'required', 'password' => 'required', ]);

    if ($validator->fails()) {
        return redirect('post/create')->withErrors($validator)->withInput();
    }

    $data = [
        'name' => $request->input('name'),
        'email' => $request->input('email'),
        'password' => $request->input('password'),
    ];

    if(count(User::where('email', '=', $request->input('email'))->get()) > 0)
    {
        return redirect('/register')->with('success', 'Work email already exists.');
    }
    $this->userRepository->SaveUser($data);

    return redirect('/register')->with('success', 'Company successfully registered.');
}

ipewds left a reply on Registration Working But Not Saving In Domain

well my code only goes like this really.

User Repo.

    $userId = Uuid::generate();
        $user = new User;
        $user->id = $userId ;
        $user->email = $data['email'];
        $user->password = bcrypt($data['password']);
        $user->save();
        $companyData = ['name' => $data['name'], 'userId' => $userId];
        $this->companyRepository->SaveCompany($companyData);

Company Repo

    DB::beginTransaction();
        $company = new Company;
        $company->id = Uuid::generate();
        $company->userId = $data['userId'];
        $company->name = $data['name'];
        $company->save();
            

It is just basic approach for the eloquent save.

ipewds left a reply on Registration Working But Not Saving In Domain

I'm sure my credentials are set properly. Because if it isn't laravel should throw a message right? It would say a connection cannot be made.

09 Dec
2 years ago

ipewds started a new conversation Registration Working But Not Saving In Domain

In local development my registration works perfectly but when I deployed it in laravel forge with digital ocean it returns the message "Registered Successfully" but no user is being saved in the database. I just created an route to return all the User so it on a page. I'm using Eloquent Models for my database processes btw.

06 Aug
2 years ago

ipewds left a reply on Browsing Laravel Database In Windows

Thank you for the replies guys. I managed to made it work. @adiachenko thank you for that information. gonna do and RND about HeidiSQL thank you bro. @Snapey I think it was a caching issue. all i did is close my cmd that is running the laravel server and re run it. Such a great community.

ipewds started a new conversation Browsing Laravel Database In Windows

Hi, I am new to laravel and I am very confused on how I browse and see my data if it is saved or not in windows using PHP myadmin or Mysql Query Browser? In mac you can use the Sequel Pro but how do I do this in windows using the mentioned mysql browsers. I'm stuck. please help.

05 Aug
2 years ago

ipewds left a reply on Homestead 2.0 Error

@sitesense @bashy Hi i changed the database name, and file paths any idea what i am doing wrong in here?

ip: "192.168.10.10" memory: 2048 cpus: 1 provider: virtualbox

authorize: C:/Users/KIAN/.ssh/id_rsa.pub

keys: - C:/Users/KIAN/.ssh/id_rsa

folders: - map: ~/Projects to: /home/vagrant/Code

sites: - map: laravel.dev to: /home/vagrant/Code/Laravel/public

databases: - name: LaravelDatabase

variables: - key: APP_ENV value: local