davy_yg

Experience

5,410

0 Best Reply Awards

  • Member Since 2 Weeks Ago
  • 37 Lessons Completed
  • 0 Favorites

29th April, 2017

davy_yg started a new conversation Changing File Name With Codes? • 17 hours ago

Hello,

I wonder if you can change a file name with codes. I don't remember nor could find icons4-hover.png yet if you inspect element could can find that in this website:

http://fresway.com --> see button 10 has double hover if you click it. The file name only has one hover.

Is this codes creates hover without typing the name:

     <li>
                            <input id="c11" type="checkbox">
                            <label for="c11">
                                <a href="{{action([email protected]')}}">
                                    @if($uri=="home/bussinesscard")
                                        <div id="circle1"><div style="margin-left:            -10px; ">            <img src="{{url("")}}/images/add/icons4.png" /></div></div>
                                        <!-- <img src="{{url("")}}/images/button-11-hover.png"/>  -->
                                    @else
                                        <div id="circle1"><div style="margin-left: -10px; ">            <img src="{{url("")}}/images/add/icons4.png" /></div></div>
                                        <!-- <img src="{{url("")}}/images/button-11.png"/> -->
                                    @endif
                                </a>
                            </label>
                        </li>

26th April, 2017

davy_yg started a new conversation Extends • 4 days ago

Can anyone help to me to read this codes:

  @extends('soulfy')
  @section('title', 'Home')
  @section('content')

What does it mean?

davy_yg started a new conversation PDOException In Connector.php • 4 days ago

Hello,

Does anyone knows what this error means?

PDOException in Connector.php line 50: SQLSTATE[HY000] [1045] Access denied for user 'root'@'180.252.44.43' (using password: NO)

davy_yg left a reply on Setting Online Page Works Offline • 4 days ago

Nevermind, I finally find the answer from the old web developer who build the sites. Just only the make the online site offline.

davy_yg started a new conversation Passing $user_profile To The View • 4 days ago

Hello,

I am trying to understand this codes if anyone can help me. Can you pass $user_profile to the view from the controller just by using this codes?

Controllers/HomeController.php

public function getHome()
{
    $domain = $_SERVER['SERVER_NAME'];
    $user = User::where('domain', $domain)->first();



    $user_profile = \Soulfy\UserProfile::where('user_id', $user->id)->first();

    if ($user_profile == null) {
        $user_profile = new UserProfile();
        $user_profile->user_id = $user->id;
        $user_profile->save();
    }

    if (Auth::check()) {
        $articles = Timeline::where('user_id', $user->id)->where('social_id', $user->id)->where('social', 'article')->orderBy('created_at', 'desc')->get();
    } else {
        $articles = Timeline::where('user_id', $user->id)->where('social_id', $user->id)->where('social', 'article')->where('status', true)->orderBy('created_at', 'desc')->get();
    }

    $settings = Setting::where('user_id', $user->id)->get();
    if ($settings) $settings = $settings[0];

    return view('soulfy.index_v2', ['user' => $user, 'articles' => $articles, 'settings' => $settings]);


    //return view('soulfy.index_v2',compact('user'));
}

views/soulfy/index_v2.blade.php

  <img src="{{$user_profile->profile_image}}"/> 

24th April, 2017

davy_yg started a new conversation Setting Online Page Works Offline • 6 days ago

Hello all,

I am having two websites online that I am trying to make it works offline. The programmer uses laravel to program it and using share hosting.

I am willing to pay US$20.00 if anyone can help me set these two websites online offline.

www.fresway.com www.soulfy.com

Leave me your skype to me if anyone is interested.

Just to make it work offline on my computer.

davy_yg left a reply on Routing • 6 days ago

Updating like how? Upgrading my laravel version number?

The problem is I cannot even see my project show offline. It shows very well online.

That is strange to me.

http://www.soulfy.com/

That's the project shown very well online but not offline.

davy_yg left a reply on Routing • 6 days ago

http://localhost:8000/Hello

The result is:

Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0

Fatal error: Unknown: Failed opening required 'C:\xampp\htdocs\framework_freshway\framework/server.php' (include_path='C:\xampp\php\PEAR') in Unknown on line 0

davy_yg left a reply on Database Builder • 6 days ago

or $10.00/hour at most so that I can get away with the basic stuff and start working on my project.

if anyone interested please let me know your skype name or post a comment.

davy_yg left a reply on Seperating Html File And Laravel Framework • 6 days ago

Yes, it is a shared host.

@snapey: what is the purpose of lifecycle? I have read it but do not quite understand.

I try one thing: http://localhost/framework_freshway/public/index.php

and it keeps carrying me to localhost/dashboard I wonder how to prevent this to happen

Also, how about opening my view file like index.blade.php without carrying it to dashboard?

davy_yg left a reply on Database Builder • 6 days ago

Hey, I also willing to pay anyone US$ 5.00 / hour if anyone can teach me laravel through skype while working on my project as a sample.

davy_yg left a reply on Database Builder • 6 days ago

I check my phpmyadmin it should have the database called:

wwwsoulf_revsoul

Hey, I also wonder where that XP points comes from? or comes from everything like watching video tutorial, starting a thread, posting on discussing etc. ?

davy_yg left a reply on Seperating Html File And Laravel Framework • 6 days ago

Can you read my index.php codes above and explain why it can connect to the laravel framework?

This is my link: http://fresway.com/

They really separate it into two folders: laravel framework and public_html

davy_yg left a reply on Unable To Connect To The Laravel Framework • 6 days ago

This is what happen so far:

C:\xampp\htdocs\framework_freshway\framework>php artisan serve Laravel development server started on http://localhost:8000/ [Mon Apr 24 12:53:43 2017] PHP Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0 [Mon Apr 24 12:53:43 2017] PHP Fatal error: Unknown: Failed opening required 'C:\xampp\htdocs\framework_freshway\framework/server.php' (include_path='C:\xampp\php\PEAR') in Unknown on line 0 [Mon Apr 24 12:53:43 2017] PHP Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0 [Mon Apr 24 12:53:43 2017] PHP Fatal error: Unknown: Failed opening required 'C:\xampp\htdocs\framework_freshway\framework/server.php' (include_path='C:\xampp\php\PEAR') in Unknown on line 0 [Mon Apr 24 12:53:43 2017] PHP Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0 [Mon Apr 24 12:53:43 2017] PHP Fatal error: Unknown: Failed opening required 'C:\xampp\htdocs\framework_freshway\framework/server.php' (include_path='C:\xampp\php\PEAR') in Unknown on line 0

http://localhost:8000/

Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0

Fatal error: Unknown: Failed opening required 'C:\xampp\htdocs\framework_freshway\framework/server.php' (include_path='C:\xampp\php\PEAR') in Unknown on line 0

davy_yg left a reply on Blade Templates • 6 days ago

I got an idea: If anyone can teach me laravel through skype I am willing to pay US$5.00 / hour

Let me know your skype address.

davy_yg left a reply on Unable To Connect To The Laravel Framework • 6 days ago

I also try to type: localhost/framework_freshway/public/admin

to go to :

 Route::get('/', [
      'as' => 'index', 'uses' => [email protected]'
 ]);
 Route::get('/admin', [
      'as' => 'admin', 'uses' => [email protected]'
 ]);

Yet it carries me to localhost/dashboard

Any clue why?

davy_yg left a reply on Seperating Html File And Laravel Framework • 6 days ago

@MaverickChan please stop commenting on my post if I cannot help me on anything!

davy_yg left a reply on Database Builder • 6 days ago

I try this:

C:\xampp\mysql\bin>mysql -u root -p wwwsoulf_revsoul

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

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

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

MariaDB [wwwsoulf_revsoul]> show tables -> -> ByeCtrl-C -- exit!

C:\xampp\mysql\bin>

Now I wonder why I cannot see the tables with command prompt?

23rd April, 2017

davy_yg left a reply on Database Builder • 6 days ago

I watches this tutorial https://laracasts.com/series/laravel-from-scratch-2017/episodes/4

and trying to operate the database through

Command prompt:

C:\xampp\htdocs\soulfy_framework2>mysql -uroot -p 'mysql' is not recognized as an internal or external command, operable program or batch file.

C:\xampp\htdocs\soulfy_framework2>use wwwsoulf_revsoul 'use' is not recognized as an internal or external command, operable program or batch file.

C:\xampp\htdocs\soulfy_framework2>show tables 'show' is not recognized as an internal or external command, operable program or batch file.

C:\xampp\htdocs\soulfy_framework2>

I wonder why it does not work?

davy_yg left a reply on Database Builder • 6 days ago

Command prompt:

C:\xampp\htdocs\soulfy_framework2>mysql -uroot -p 'mysql' is not recognized as an internal or external command, operable program or batch file.

C:\xampp\htdocs\soulfy_framework2>use wwwsoulf_revsoul 'use' is not recognized as an internal or external command, operable program or batch file.

C:\xampp\htdocs\soulfy_framework2>show tables 'show' is not recognized as an internal or external command, operable program or batch file.

C:\xampp\htdocs\soulfy_framework2>

I wonder why it does not work?

davy_yg left a reply on Database Builder • 6 days ago

The laravel version that I am trying to edit is: The Laravel Framework version 5.1.8 (LTS)

I wonder if this is a good tutorial to watch I don't know if anyone has watches it before :

https://laracasts.com/series/laravel-5-fundamentals

davy_yg left a reply on Seperating Html File And Laravel Framework • 6 days ago

The index.php file is that I find the soulfy_framework2: index.blade.php

Can anyone help me read the above codes:

public_html/index.php ?

davy_yg left a reply on Database Builder • 6 days ago

Which intro video to watch there are too many videos.

davy_yg left a reply on Database Builder • 6 days ago

Is that a choice in laravel? I can choose ORM (like placing the database codes in database php files) OR placing the database query codes in controller, is that true?

davy_yg started a new conversation Database Builder • 1 week ago

Hello,

I would like to ask something about building the database in laravel. Should I use controller to control the databases? Unlike in codeigniter which uses model to control the databases. Is that true?

I have read this documentation: https://laravel.com/docs/5.4/queries#selects

davy_yg left a reply on Routing • 1 week ago

Laravel Framework 5.1.8

davy_yg left a reply on Blade Templates • 1 week ago

Yes, I am in the middle of it. Yet, I do not know when will I get this prob. pass.

I probably need some help so that I can get through it faster.

davy_yg left a reply on Seperating Html File And Laravel Framework • 1 week ago

I am in the middle of someone else laravel codes. I only have the code without knowing the person. He created 2 folders:

  • Laravel framework
  • public_html

Laravel framework is the normal laravel framework and public_html.

public html consist of one index.php file:

index.php

<?php

 /**
 * Laravel - A PHP Framework For Web Artisans
 *
 * @package  Laravel
 * @author   Taylor Otwell <[email protected]>
 */

  /*
  |--------------------------------------------------------------------------
  | Register The Auto Loader
  |--------------------------------------------------------------------------
  |
  | Composer provides a convenient, automatically generated class loader     for
  | our application. We just need to utilize it! We'll simply require it
  | into the script here so that we don't have to worry about manual
  | loading any of our classes later on. It feels nice to relax.
  |
  */

  require __DIR__.'/../soulfy_framework/bootstrap/autoload.php';

  /*
 |--------------------------------------------------------------------------
 | Turn On The Lights
 |--------------------------------------------------------------------------
 |
 | We need to illuminate PHP development, so let us turn on the lights.
 | This bootstraps the framework and gets it ready for use, then it
 | will load up this application so that we can run it and send
 | the responses back to the browser and delight our users.
 |
 */

 $app = require_once __DIR__.'/../soulfy_framework/bootstrap/app.php';

 /*
 |--------------------------------------------------------------------------
 | Run The Application
 |--------------------------------------------------------------------------
 |
 | Once we have the application, we can handle the incoming request
 | through the kernel, and send the associated response back to
 | the client's browser allowing them to enjoy the creative
 | and wonderful application we have prepared for them.
 |
 */

 $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);

 $response = $kernel->handle(
 $request = Illuminate\Http\Request::capture()
 );

$response->send();

$kernel->terminate($request, $response);

images, css etc.

Looks like the frontend of the website.

Is it possible to create the front end in one folder and the backend on one seperate folder?

How to do so?

davy_yg left a reply on Routing • 1 week ago

I delete the rest of the routes except this:

Route::get('Hello', function() { return 'Hello World'; });

davy_yg started a new conversation Seperating Html File And Laravel Framework • 1 week ago

Can you seperate html file and laravel framework in two different folders?

How to do it?

davy_yg left a reply on Blade Templates • 1 week ago

I try :

app/Http/routes.php

Route::get('home-blade', function() {
  return view('home');
}); 

url: http://localhost/soulfy_framework2/public/home-blade

And it carries me to localhost/dashboard

This is strange to me.

davy_yg started a new conversation Blade Templates • 1 week ago

How to type the url and routes so that I can access the blade templates?

I have soulfy_framework2/resources/views/home.blade.php

How to type the routes and url so that I can access the blade templates?

Thanks in advance.

davy_yg left a reply on Routing • 1 week ago

It also carries me to http://localhost/dashboard/

davy_yg left a reply on Routing • 1 week ago

I check the route it is already added but I cannot see it in my web.

C:\xampp\htdocs\soulfy_framework2>php artisan route:list +--------+----------+-------+------+---------+------------+ | Domain | Method | URI | Name | Action | Middleware | +--------+----------+-------+------+---------+------------+ | | GET|HEAD | Hello | | Closure | | +--------+----------+-------+------+---------+------------+

davy_yg started a new conversation Routing • 1 week ago

Hello,

I am trying to understand the concept of routing in laravel:

Route::get('Hello', function() { return 'Hello World'; });

After typing this url: http://localhost/soulfy_framework2/Public/Hello

I return to dashboard --> http://localhost/dashboard/

This is strange to me. I expect a text called Hello World would appears.

davy_yg left a reply on How To Call The Controller In Laravel? • 1 week ago

The error is line 1275.

One thing that I do not understand about the framework that I am trying to fix is that why it divided into two folders :

  • laravel framework
  • public_html

All html is on public_html folder

The only problem is that this file only works online and not offline. It's not suppose to work like that.

This is the error message:

ErrorException in e1095e8760d9b6fa030be63fbe2c087d line 1275: Trying to get property of non-object (View: C:\xampp\htdocs\soulfy_framework\resources\views\home.blade.php) (View: C:\xampp\htdocs\soulfy_framework\resources\views\home.blade.php)

davy_yg left a reply on How To Call The Controller In Laravel? • 1 week ago

This : views/home.blade.php

and

http://www.advance-web-studio.com/laravel/home_blade.txt

are the same files. the top are partial only. I take it apart. The txt files are actually php. I change it into txt since I cannot attached php file and view it on my web server.

davy_yg left a reply on How To Call The Controller In Laravel? • 1 week ago

I have read the documentation but do not understand it throughly.

I also have watch like 1 dvd tutorial about laravel hoping that I could catch up and able to codes with laravel. I have learned CI for 1 year and new to laravel.

And now I have to edit someone else codes for my job.

22nd April, 2017

davy_yg left a reply on How To Call The Controller In Laravel? • 1 week ago

It javascript

views/home.blade.php

<script>
function loadtimeline(base, type) {
    $("#status_img_profile").hide();
    if (TIMELINE_LOADING) return;
    TIMELINE_LOADING = true;
    timelineShowLoading();
    skip = 0;
    social_tipe = type;

    if (type == "article") {
        $(".backend-box").hide();
        $(".content-gallery ").hide();
        $("#artikel_placeholder").show();
        $(".placeholder-third").hide();
 //            alert(1);
        $(".plus-minus-toggeler:not(.dont-hide)").hide();
    }

    if (type == "path") {
        pesanErr("Sorry, we are not yet available");
    }
    else {
        var src = $('label[for=c10] a img').attr("src").replace("-hover.png", ".png");
        $('label[for=c10] a img').attr("src", src);


        if (type == "fb") {
            showProfileInfo('{{$user_profile->name}}',    '{{$user_profile->birthday!=null ?date("Y- m-d",strtotime($user_profile->birthday)):""}}', '{{$user_profile->hometown}}', '{{$user_profile->gender}}', '{{$user_profile->location}}', '{{$user_profile->education}}', '{{$user_profile->work}}', '{{$user_profile->profile_image}}');
        }

        if (type == "twitter") {
            showProfileInfoTwitter("{{$user->twitter->name}}", "{{$user->twitter->screen_name}}", "{{$user->twitter->profile_image}}", "{{$user->twitter->description}}", 0, 0);
        }

davy_yg left a reply on How To Call The Controller In Laravel? • 1 week ago

what is type and where to find type?

davy_yg left a reply on How To Call The Controller In Laravel? • 1 week ago

.env

 DB_HOST=localhost 
 DB_DATABASE=wwwsoulf_revsoul
 DB_USERNAME=root 
 DB_PASSWORD=

davy_yg left a reply on How To Call The Controller In Laravel? • 1 week ago

I cannot find the routes directory until I create it then afterward I create web.php file and add that code:

'Route::get('/soulfy', [email protected]');'

unfortunately in my localhost it does not since it has this error message:

ErrorException in e1095e8760d9b6fa030be63fbe2c087d line 1275: Trying to get property of non-object (View: C:\xampp\htdocs\soulfy_framework\resources\views\home.blade.php) (View: C:\xampp\htdocs\soulfy_framework\resources\views\home.blade.php)

resources/views/home.blade.php

     if (type == "twitter") {
            showProfileInfoTwitter("{{$user->twitter->name}}",      "{{$user->twitter->screen_name}}", "{{$user->twitter->profile_image}}", "{{$user->twitter->description}}", 0, 0);
             }

davy_yg left a reply on How To Call The Controller In Laravel? • 1 week ago

I have read the documentation. I try this:

this is the route of Soulfy website.

www.soulfy.com/facebook/login

 // Generate a login URL
 Route::get('/facebook/login',['as'=>'fb.login',         function(SammyK\LaravelFacebookSdk\LaravelFacebookSdk $fb)
{
Session::put('domain',$_GET['domain']);

// Send an array of permissions to request
$login_url = $fb->getLoginUrl();

// Obviously you'd do this in blade :)
return redirect($login_url);
}]);

I wonder why after typing the url the message says not found.

I thought I just have type /facebook/login next to the url to get something appears.

davy_yg started a new conversation How To Call The Controller In Laravel? • 1 week ago

Hello,

I wonder why Controllers\HomeController

public function getSoulfy()
    {
    return view('soulfy.soulfy');
    }

I try to call the view through the url (like di codeigniter - I know this - I am new to laravel)

http://www.soulfy.com/getSoulfy

And it does not work

Not Found

Any clue why?

davy_yg left a reply on Unable To Connect To The Laravel Framework • 1 week ago

I think the $user is root.

davy_yg left a reply on Unable To Connect To The Laravel Framework • 1 week ago

Is there not any shorter way to debug this error message. I wonder why it works online already but not offline. I do not change any of the codes.

Anyway, this is part of the codes that uses $user

 $uri = Request::path();
 if ($uri == "home/video") {
 $timeline = Timeline::take(8)->orderBy('updated_at',      'desc')->where('user_id', $user['id'])->where('social', 'youtube')->get();
 $check = Timeline::where('user_id', $user['id'])->where('social',   'youtube')->get();

  for ($i = 0; $i < count($timeline); $i++) {
    $video_id[$i] = explode("/", $timeline[$i]->content);
    $img_url[$i] = "http://img.youtube.com/vi/" . $video_id[$i][4] . "/default.jpg";
}

} elseif ($uri == "home/articles") { $timeline = Timeline::take(8)->orderBy('updated_at', 'desc')->where('user_id', $user['id'])->where('social', 'article')->where('status', '1')->get(); $check = Timeline::where('user_id', $user['id'])->where('status', '1')->where('social', 'article')->get();

} elseif ($uri == "home/gallery") { $timeline = Timeline::take(8)->orderBy('updated_at', 'desc')->where('user_id', $user['id'])->where('social', 'gallery')->get(); $check = Timeline::where('user_id', $user['id'])->where('social', 'gallery')->get(); } else { $timeline = Timeline::take(8)->orderBy('updated_at', 'desc')->where('user_id', $user['id'])->where('status', '1')->get();

      $check = Timeline::get();
for ($i = 0; $i < count($timeline); $i++) {
    if ($timeline[$i]->social == "youtube") {
        $video_id[$i] = explode("/", $timeline[$i]->content);
        $img_url[$i] = "http://img.youtube.com/vi/" . $video_id[$i][4] . "/default.jpg";
    }
}

}

      $user_setting = \Soulfy\Setting::where('user_id',                                                                                                     $        $user['id'])->join('user_theme', 'user_setting.themes_enable', '=', 'user_theme.themes_enable')->first();


  if ($user->image_profile == null) {
  $image_url = $user->fb_profile_image;

  } else {
  $image_url = url("") . '/' . $user->image_profile;

} $fb_image_url = ""; $user_profile = \Soulfy\UserProfile::where('user_id', $user->id)->first(); if ($user_profile) { $fb_image_url = '<img onclick="showProfileInfo(this)" data-name="' . $user_profile->name . '"' . ' data-first_name="' . $user_profile->first_name . '" data-last_name="' . $user_profile->last_name . '" data-email="' . $user_profile->email . '" data-url="' . $user_profile->url . '" data-about="' . $user_profile->about . '" data-gender="' . $user_profile->gender . '" data-location="' . $ user_profile->location . '" src="' . $user_profile->profile_image . '"/>'; }

21st April, 2017

davy_yg left a reply on Composer • 1 week ago

I am using xampp

davy_yg left a reply on Unable To Connect To The Laravel Framework • 1 week ago

This is a little bit strange since I downloaded the database and the file exactly from online:

http://fresway.com/

Online it works perfectly. When I downloaded it offline errors start appearing. I wonder why?

davy_yg left a reply on Composer • 1 week ago

Windows 10

Edit Your Profile
Update

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