davy_yg

Experience

50,600

0 Best Reply Awards

  • Member Since 1 Year Ago
  • 317 Lessons Completed
  • 0 Favorites

14th August, 2018

davy_yg left a reply on Error Appearing • 4 days ago

It already works thanks!

It's mbstring have to be enable in php.ini and I contact my web server provider.

davy_yg left a reply on Error Appearing • 4 days ago

I wonder why it does not exist since it suppose to be a system file. My online web used to work but suddenly it doesn't.

davy_yg started a new conversation Error Appearing • 4 days ago

I have this error appearing :

(2/2) ErrorException

Call to undefined function Illuminate\Support\mb_strimwidth() (View: /home/advancew/public_html/victoryshop.advance-web-studio.com/vito/resources/views/store/index.blade.php)

What might be the cause?

10th August, 2018

davy_yg started a new conversation Trying To Get Property 'name' Of Non-object • 1 week ago

Hello,

ErrorException in 03007f072e31a098b220ef17e87d73f3 line 1573: Trying to get property 'name' of non-object (View: C:\xampp\htdocs\soulfy_repo\framework\resources\views\home.blade.php) (View: C:\xampp\htdocs\soulfy_repo\framework\resources\views\home.blade.php)

    showProfileInfoTwitter("<?php echo e($user->twitter->name); ?>", "<?php echo e($user->twitter->screen_name); ?>", "<?php echo e($user->twitter->profile_image); ?>", "<?php echo e($user->twitter->description); ?>", 0, 0);

I almost forget what may cause the above error. Is it identify $user object?

(It's been 3 months after using CI and now I am back to Laravel trying to fix my previous websites)

24th July, 2018

davy_yg left a reply on Rename DB • 3 weeks ago

I think renaming the database it used to work. I forget when? I wonder why it does not work this time.

davy_yg left a reply on Rename DB • 3 weeks ago

Is it not possible to rename a database?

Do I have to export it -> create a new database ->import it -> delete the old one ?

davy_yg left a reply on Rename DB • 3 weeks ago

I only need the sql command. I wonder what is the correct sql syntax to make it works.

davy_yg started a new conversation Rename DB • 3 weeks ago

Hello,

I have been trying to rename my DB in localhost:

ALTER DATABASE old_name  
Modify Name = new_name;

and it does not work. I wonder why?

8th July, 2018

davy_yg left a reply on Import Database • 1 month ago

I am running under Windows 10.

This is what happen if I type mysql:

[email protected] c:\xampp

mysql

Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 39 Server version: 10.1.31-MariaDB mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>

6th July, 2018

davy_yg left a reply on Import Database • 1 month ago

I still wonder why my command line does not works. I already try importing bit by bit but it will takes forever - since many errors will appears if I input a long sql lines. Javascript fatal error - I see this error repeatedly.

Then someone advice me to use sql command line. but I still have not been successful using it.

davy_yg left a reply on Import Database • 1 month ago

I need to import a large sql file - 160 MB to xampp.

davy_yg left a reply on Import Database • 1 month ago

[email protected] C:\xampp\mysql\bin

mysqldump -u root -p staging_ipengen_03_latest > d:\Marketing_Tools\iPengen\staging_ipengen_03.sql

The system cannot find the path specified.

It still does not works!

davy_yg left a reply on Import Database • 1 month ago

[email protected] c:\xampp

mysqldump -u root -p staging_ipengen_03_latest > d:\Marketing_Tools\iPengen\staging_ipengen_03.sql

The system cannot find the path specified.

[email protected] c:\xampp

mysql -u root -p staging_ipengen_03_latest > d:\Marketing_Tools\iPengen\staging_ipengen_03.sql

The system cannot find the path specified.

davy_yg left a reply on Import Database • 1 month ago

[email protected] c:\xampp

mysql -u root -p staging_ipengen_03_latest < D:\Marketing_Tools\iPengen\staging_ipengen_03.sql

The system cannot find the path specified.

Why cannot find the path specified?

3rd July, 2018

davy_yg left a reply on Import Database • 1 month ago

I found the Shell button. Then should I type:

mysql -u username -p database_name < file.sql

username: root

and where to place the file.sql ?

davy_yg left a reply on Import Database • 1 month ago

I do not have the command line installed yet.

davy_yg started a new conversation Import Database • 1 month ago

Hello,

I need to import a 252 MB sql databases from online to offline.

I try to do it my normal export and import sql yet, Javascript fatal error keeps appearing.

My friend said I could use command line to do it. But I do not know how to. Can anyone here help me explain how to use command line?

25th June, 2018

davy_yg left a reply on Comment In Sublime • 1 month ago

It is *.php file but there are many html tags.

davy_yg started a new conversation Comment In Sublime • 1 month ago

I wonder how to comment and uncomment in sublime?

(1) Normally it works in my sublime just by typing ctrl + / (to comment) and ctrl + / again (to uncomment).

This time if press ctrl + / what appears is <-- if I press it once again then what appears is <--

What to fix this issue so that what appears is like line number (1). Any clue?

4th June, 2018

davy_yg left a reply on Install Sass • 2 months ago

I am using version 3.1.1 build 3176

No available version available. I already check for updates.

I am still using the free version.

davy_yg started a new conversation Install Sass • 2 months ago

Hello,

I have been trying to install Sass syntax in my sublime but unable to do it.

See, I find this link: https://packagecontrol.io/packages/Sass

and I don't know how to use the git and also, I have been search in my sublime package control for "Sass" and unable to find it.

7th May, 2018

davy_yg left a reply on Less Error • 3 months ago

I finally solved it. I forget the ;

davy_yg started a new conversation Less Error • 3 months ago

C:\xampp\htdocs\coolcicms\assets\less>lessc custom.less custom.css ParseError: Unrecognised input in C:\xampp\htdocs\coolcicms\assets\less\custom.less on line 63, column 7: 62 .form-control 63 width: 300px; 64 }

C:\xampp\htdocs\coolcicms\assets\less>

  • Is it possible to create the css file in different folder then the less file? For instance the css file is location in ../css relative to the less file. How to type the syntax to create the less file?

  • Next, why the below command shows some error? Should css syntax also works in less? 300 px; is being highlited in red.

davy_yg started a new conversation Less Compiler • 3 months ago

I wonder if sublime could detect less? Since the less file is all in one color.

I am trying to do the works in one compiler, right now I am using Sublime. Unfortunately sublime cannot compile less.

Or is there any way to make sublime able to compile less such as adding special plugin for instance?

4th May, 2018

davy_yg started a new conversation Erasing Button Depth • 3 months ago

I am trying to create a button but I see some depth in the button.

I am trying to erase the depth and just want to see plain box button without any depth.

This is my custom.css

.button, [type="submit"] {

    background-color: #4caf50;
    padding: 10px;
    color: white;
    cursor: pointer;
    display: inline-block;
}

I wonder why there is some depth in my button? I wonder if there is other css files (since this is from a free template) that might add to my button css files. If there is, how to erase the depth?

davy_yg left a reply on Sass • 3 months ago

What does this map file means?

{"version":3,"file":"../style.css","sources":["style.scss","../node_modules/bootstrap   /scss/_functions.scss","../node_modules/bootstrap/scss/_variables.scss","_variables.scss","../node_modules/compass-mixins/lib/_compass.scss","../node_modules/compass-mixins/lib/compass/_functions.scss","../

Does it mean all the *.scss files being compiled into style.css?

3rd May, 2018

davy_yg left a reply on Sass • 3 months ago

They have css/maps/style.css.map

{"version":3,"file":"../style.css","sources":["style.scss","../node_modules/bootstrap   /scss/_functions.scss","../node_modules/bootstrap/scss/_variables.scss","_variables.scss","../node_modules/compass-mixins/lib/_compass.scss","../node_modules/compass-mixins/lib/compass/_functions.scss","../

...

I only wonder why I cannot find the node_modules/ but the file that is being reference is still working. Since the templates looks just fine.

davy_yg started a new conversation Sass • 3 months ago

I downloaded a free template off the internet.

When I cek the css reference with inspect element all of them referencing *.scss

When I cek the css references:

<link rel="stylesheet" href="node_modules/mdi/css/materialdesignicons.min.css">
<link rel="stylesheet" href="node_modules/simple-line-icons/css/simple-line-icons.css">
<link rel="stylesheet" href="node_modules/flag-icon-css/css/flag-icon.min.css">
<!-- endinject -->
<!-- plugin css for this page -->
<link rel="stylesheet" href="node_modules/chartist/dist/chartist.min.css" />
<link rel="stylesheet" href="node_modules/jvectormap/jquery-jvectormap.css" />
<!-- End plugin css for this page -->
<!-- inject:css -->
<link rel="stylesheet" href="css/style.css">

I only afraid that they change the css name which is differennt from the *.scss files which is hard to trace.

davy_yg started a new conversation AppServiceProvider • 3 months ago

Hello,

I wonder what this is:

AppServiceProvider.php

public function boot()
    {
    Schema::defaultStringLength(191);

    view()->composer('layouts.store.store', function ($view) {
        $view->with('information', \App\SiteSetting::getInformation());
    });


    //Only for Phone
    view()->composer('store.index', function ($view) {
        $view->with('information', \App\SiteSetting::getInformation());
        $view->with('slides', \App\Advertisements::getSlides());
        $view->with('index_featured', \App\Advertisements::getIndexFeatured());
    });

I am just trying to understand someone else code.

2nd May, 2018

davy_yg started a new conversation Return Static In Model • 3 months ago

Hello,

I wonder they use:

return static::where('prod_featured', 1)->limit('4')->get();

What does static means? Is it refering to products table?

App/Products

class Products extends Model
{
    use SoftDeletes;

    protected $primaryKey = 'prod_id';
    protected $guarded = ['prod_id'];
    protected $dates = ['deleted_at'];


public static function get_featured()
    {
        return static::where('prod_featured', 1)->limit('4')->get();
    }

30th April, 2018

davy_yg left a reply on Random Image • 3 months ago

let say the column name is bank_pic and the location - localhost/eliteshop/images :

'bank_pic' => 'localhost/eliteshop/images'

Will this code create images? How do they know the image size?

If I use this code

'bank_pic' => $faker->imageUrl(100, 100),

How do they know the location of the image file? and will the images will actually be created?

29th April, 2018

davy_yg started a new conversation Rollback Migration • 3 months ago

Hello,

I have many tables in my databases that I migrate. When trying to rollback the migration:

C:\xampp\htdocs\eliteshop>php artisan migrate:rollback
hRolling back: 2018_04_30_034439_create_polls_table
Rolled back:  2018_04_30_034439_create_polls_table

Why only 2 tables being roll back?

davy_yg left a reply on Random Image • 3 months ago

I wonder if this is the only reference for seeder:

https://laravel.com/docs/5.6/seeding

I wonder how to seed integer random data or only limited integer from 1 up to 3 for example. and what about image?

Why use $faker? In the reference they use:

    DB::table('banks')->insert([            
        'bank_name' => str_random(10),
        'bank_owner' => str_random(10),
        'bank_pin' => str_random(10),
        'bank_status' => str_random(10),
    ]);

Should I put

'bank_pic' => $faker->imageUrl(100, 100),

for example?

davy_yg started a new conversation Random Image • 3 months ago

Is it possible to seed my database by random dummy image?

What kind of image would that be?

davy_yg left a reply on Webpack • 3 months ago

What's missing?

I have app.js and trial.less file in the right location.

davy_yg left a reply on Webpack • 3 months ago

We can compile it directly right? simply just by referencing the link.

davy_yg started a new conversation Npm Run Watch • 3 months ago

through npm run watch

Should we leave the cmd prompt open to keep the css file updated everytime we update the less files?

davy_yg left a reply on Webpack • 3 months ago

I think I already run the npm install. There is node_modules in my laravel framework.

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": "npm run development -- --watch", "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 --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" }, "devDependencies": { "axios": "^0.18", "bootstrap": "^4.0.0", "popper.js": "^1.12", "cross-env": "^5.1", "jquery": "^3.2", "laravel-mix": "^2.0", "lodash": "^4.17.4", "vue": "^2.5.7" }}

28th April, 2018

davy_yg left a reply on Webpack • 3 months ago

It still there:

"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",

davy_yg left a reply on Webpack • 3 months ago

Then, I am trying to configure it:

C:\xampp\htdocs\shopee_lvl\framework>npm run dev

@ dev C:\xampp\htdocs\shopee_lvl\framework npm run development

@ development C:\xampp\htdocs\shopee_lvl\framework cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

'cross-env' is not recognized as an internal or external command, operable program or batch file. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @ development: cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @ development script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Admin\AppData\Roaming\npm-cache_logs\2018-04-28T20_09_29_268Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @ dev: npm run development npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @ dev script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Admin\AppData\Roaming\npm-cache_logs\2018-04-28T20_09_29_346Z-debug.log

C:\xampp\htdocs\shopee_lvl\framework>

webpack.mix.js

mix.js('resources/assets/js/app.js', 'public/js')
//   .sass('resources/assets/sass/app.scss', 'public/css');
.less('resources/assets/trial.less', 'public/css');

I don't know what causing the error and I also do not see trial.css in public/css folder after running the script.

davy_yg started a new conversation Webpack • 3 months ago

What is web pack in Laravel?

I am in the middle of watching the Laravel mix tutorial series and still do not understand what web pack are for.

davy_yg left a reply on Sass • 3 months ago

I think I should read it again later.

One thing about less that just pop out of my mind: One problem - since you are creating less files instead of css files, to see them works you have to compile the file into css first which makes the process slower.

I usually create css files and see it work right away after saving it. Now, if using less file I have to compile it first before seeing it work.

davy_yg left a reply on Sass • 3 months ago

Looks like the map is a json file (similar format), and it has the address of the *.css

davy_yg left a reply on Less • 3 months ago

I think so. Thanks.

davy_yg left a reply on Less • 3 months ago

I see some website that has less files but do not have node_modules folders in it that I find it strange.

Do they use other compiler besides nodejs or just remove it after turning the less into css.

davy_yg started a new conversation Sass • 3 months ago

When you are creating a sass file and turn it into css, it creates a *.css.map file also. What is that file is for?

Is it okay if we relocate the file?

All we need is the *.scss and *.css files right?

davy_yg started a new conversation Less • 3 months ago

Hello,

When you are the first time trying to create a less file, you are required to install npm in the folder which will create node_modules folder.

npm install -g less

Is it okay to delete the node_modules folder? I wonder what is it for? Is it only to compile the less files into css files?

27th April, 2018

davy_yg started a new conversation Error Handler • 3 months ago

Hello,

I am trying to create an error handler for the user:

exceptions/handler.php

public function render($request, Exception $exception)
    {

        // This will replace our 404 response with
        // a JSON response.
            if ($exception instanceof ModelNotFoundException) {
                return response()->json([
                    'error' => 'Resource not found'
                ], 404);
        }

        return parent::render($request, $exception);
    }

Then I create an error on purpose yet the correct error message does not appears:

 InvalidArgumentException
View [here] not found.

What's wrong?

davy_yg started a new conversation Instagram API • 3 months ago

Hello,

I am testing the instagram api. And trying to figure out way to get the token.

It shows in this video: https://www.youtube.com/watch?v=fGMk8daxF08

By click the client ID twice it will shows me the get token form. Yet, this is not in my case. I cannot click the client ID twice. It is unclickable.

davy_yg started a new conversation API Authentication • 3 months ago

Hello,

I wonder what this one for?

https://laravel.com/docs/5.6/passport#installation

Is it if you want to create your own API or using the existing API like instagram API ?

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.