davy_yg

Experience

54,430

0 Best Reply Awards

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

22nd October, 2018

davy_yg started a new conversation Setting Cron Job • 1 day ago

Hello,

I am trying to set cron job -

https://www.youtube.com/watch?v=jlCWLlLYEDc

I cannot understand do you set the time schedule on Kernel.php, on web hosting or both? If both, which one will the program follows?

Another thing, can you set up the time schedule by inputing the day and time through forms? If so, how to ? Should I pull the time schedule from the database and translate the codes to cron job codes?

Thanks in advance.

davy_yg left a reply on Cannot Redeclare App\Http\Controllers\DashboardController • 1 day ago

fixed I have the function declare twice.

21st October, 2018

davy_yg started a new conversation Cannot Redeclare App\Http\Controllers\DashboardController • 1 day ago

I wonder how to fix this error message?

Cannot redeclare App\Http\Controllers\DashboardController::searchViewTrxHarianPromo()

public function searchViewTrxHarianPromo(Request $request) {

    $data1 = date("Y-m-d", strtotime($request->start_date));
    $data2 = date("Y-m-d", strtotime($request->expire_date));


    return view('pages.dashboard.dashboardTrxHarian')
            ->with('list', $trxharian);


}

davy_yg left a reply on Autoload • 1 day ago

I wonder why it does not satisfy that requirement?

C:\xampp\htdocs\ids-api>composer update --no-scripts Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages.

Problem 1 - This package requires php ^7.1.3 but your PHP version (7.0.9) does not satisfy that requirement. Problem 2 - laravel/framework v5.6.9 requires php ^7.1.3 -> your PHP version (7.0.9) does not satisfy that requirement. - laravel/framework v5.6.8 requires php ^7.1.3 -> your PHP version (7.0.9) does not satisfy that requirement. - laravel/framework v5.6.7 requires php ^7.1.3 -> your PHP version (7.0.9) does not - Installation request for laravel/framework 5.6.* -> satisfiable by laravel/framework[5.6.x-dev, v5.6.0, v5.6.1, v5.6.10, v5.6.11, v5.6.12, v5.6.13, v5.6.14, v5.6.15, v5.6.16, v5.6.17, v5.6.18, v5.6.19, v5.6.2, v5.6.20, v5.6.21, v5.6.22, v5.6.23, v5.6.24, v5.6.25, v5.6.26, v5.6.27, v5.6.28, v5.6.29, v5.6.3, v5.6.30, v5.6.31, v5.6.32, v5.6.33, v5.6.34, v5.6.35, v5.6.36, v5.6.37, v5.6.38, v5.6.39, v5.6.4, v5.6.5, v5.6.6, v5.6.7, v5.6.8, v5.6.9].

davy_yg left a reply on Autoload • 1 day ago

Is that the cause of this error:

Fatal error: Uncaught Error: Class 'Illuminate\Foundation\Application' not found in C:\xampp\htdocs\ids-api\bootstrap\app.php:14 Stack trace: #0 C:\xampp\htdocs\ids-api\public\index.php(38): require_once() #1 {main} thrown in C:\xampp\htdocs\ids-api\bootstrap\app.php on line 14

I do not know why it automatically installed in the public folder?

davy_yg left a reply on Autoload • 2 days ago

Why do I need to skip this:

"scripts": {
    "post-root-package-install": [
        "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
    ],
    "post-create-project-cmd": [
        "@php artisan key:generate"
    ],
    "post-autoload-dump": [
        "Illuminate\Foundation\ComposerScripts::postAutoloadDump",
        "@php artisan package:discover"
    ]
},

davy_yg left a reply on Autoload • 2 days ago

Fatal error: Uncaught Error: Class 'Illuminate\Foundation\Application' not found in C:\xampp\htdocs\ids-api\bootstrap\app.php:14 Stack trace: #0 C:\xampp\htdocs\ids-api\public\index.php(38): require_once() #1 {main} thrown in C:\xampp\htdocs\ids-api\bootstrap\app.php on line 14

davy_yg left a reply on Autoload • 2 days ago

yes

davy_yg started a new conversation Autoload • 2 days ago

Hello,

I wonder why this error appears. I already install the composer and have the vendor folder. Yet, I do not see the autoload which is strange.

Warning: require(C:\xampp\htdocs\ids-api\public/../vendor/autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\ids-api\public\index.php on line 24

Fatal error: require(): Failed opening required 'C:\xampp\htdocs\ids-api\public/../vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\ids-api\public\index.php on line 24

davy_yg started a new conversation Excel Export • 2 days ago

Hello,

This is export excel function which I do not understand when I am using FromQuery.

My data does not appears:

<?php

namespace App\Exports;

use App\Model\ReportModel;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\WithMapping;
use Maatwebsite\Excel\Concerns\ShouldAutoSize;

use Maatwebsite\Excel\Concerns\FromQuery;
use Maatwebsite\Excel\Concerns\Exportable;

class ReportExport implements WithHeadings,WithMapping,ShouldAutoSize, FromQuery
{


public function headings(): array
    {
    return [
        'Orderdate',
        'OrderCode',
        'TransDate',
        'CustomerId',
        'TransAmount',
        'TotalPayment',
        'PayChannel',
        'PayChannelReffNo',
        'ProductCategory',
        'ProductDesc',
        'BillerName',
        'BillerReffNo',
        'CustomerName',
        'NoTransaction',
        'trackingRef',
        'KodePromo',
        'AmountPromo',
        'UserName',
        'MobilePhone'
    ];
    }

    

    public function query()
    {
    $report = ReportModel::leftJoin('tb_m_biller_solusi', function($join){
        $join->on('tb_r_solusiorder.productid', '=', 'tb_m_biller_solusi.Productid');
        $join->on('tb_r_solusiorder.billerid', '=', 'tb_m_biller_solusi.Billerid');            
    })
    ->leftJoin('tb_m_biller', 'tb_r_solusiorder.billerid', '=', 'tb_m_biller.biller_id')        
    ->get();
    return $report;
    }



public function map($item): array
    {
    return [
        $item->CreatedOn,
        $item->Orderid,
        $item->paydate,
        $item->Customerid,
        'TransAmount',
        $item->Amount,
        $item->pay_methode,
        $item->trackingref,
        'ProductCategory',
        $item->Productdesc,
        $item->biller_name,
        'BillerReffNo',
        $item->customername ,
        $item->no_transaction ,
        $item->trackingref,
        $item->kode_promo,
        $item->promo_amount,
        $item->Username,                             
        $item->MobilePhone,  
    ];
    }
}

I do not see the data appears on the excel spreadsheet. What should I do ? I also wonder what for is FromView?

https://laravel-excel.maatwebsite.nl/3.1/getting-started/

Another question is what is the difference between import and export?

18th October, 2018

davy_yg started a new conversation Cron Job • 4 days ago

Hello,

I would like to know how to set up the cron job? https://laravel.com/docs/5.7/scheduling

I don't understand how to create the controller. Also, is the laravel code is enough ? How to set up the auto send scheduling? Do I have to set up something in the web server.

edit_schedule.blade.php

<div class="">
    <div class="card">
        <div class="card-body" style="width:75%">
            @if ($errors->any())
                <div class="alert alert-danger">
                    <ul>
                        @foreach ($errors->all() as $error)
                            <li>{{ $error }}</li>
                        @endforeach
                    </ul>
                </div>
            @endif
            
            @if ($message = Session::get('success'))
                <div class="alert alert-success alert-block">
                    <button type="button" class="close" data-dismiss="alert">×</button> 
                        <strong>{{ $message }}</strong>
                </div>
            @endif

            @if ($message = Session::get('pesan'))
                <div class="alert alert-danger alert-block">
                    <button type="button" class="close" data-dismiss="alert">x</button>
                        <strong>{{ $message }}</strong>
                </div>
            @endif
            
            <form id="myForm" action="{{ ($data != "") ? url('/edit-promo') : url('/save-promo') }}" method="post" enctype="multipart/form-data">
                @csrf
                <input type="hidden" name="promoId" value="{{ ($data) ? $data->id : "" }}" />
                
                <b>Schedule</b>

                
                <input type="hidden" name="bannerId" value="{{ ($data) ? $data->id : "" }}" />
                <div class="form-group">
                    <label style="font-weight:500">Select Day</label>
                    <input class="form-control" name="title_promo" type="text" placeholder="" value="{{ ($data) ? $data->title : old('title') }}">
                </div>
                <div class="form-group">
                    <label style="font-weight:500">Select Time</label>
                    <input class="form-control" name="promo_code" type="text" placeholder="" value="{{ ($data) ? $data->promo_code : old('promo_code') }}">
                </div>
                
                <br>
                                    
                
                <button class="btn btn-primary">Submit</button>
                <input type="button" onclick="clearFunction()" style="color:#495057" class="btn btn-warning" value="Clear">

            </form>
        </div>
    </div>
    </div>

davy_yg started a new conversation Create Vendor Folder • 5 days ago

Hello,

I just clone a new laravel folder but it does not have any vendor folder. Any clue how to create new vendor folder?

Thanks in advance.

davy_yg left a reply on Access Denied For User • 5 days ago

I think I find the solution. I think my sql import is out dated.

davy_yg left a reply on Access Denied For User • 5 days ago

I cannot understand why this one works?

DB_USERNAME=root DB_PASSWORD=

User name Host name Password Global privileges User group Grant Action

When I try to change the password or insert a new password:

The selected user was not found in the privilege table.

davy_yg left a reply on Access Denied For User • 5 days ago

I already recheck it - it is correct. Is that why I also wonder why?

The selected user was not found in the privilege table.

All the privileges are unchecked. When I check the global privilege:

GRANT ALL PRIVILEGES ON *.* TO ...

#1133 - Can't find any matching row in the user table

davy_yg started a new conversation Access Denied For User • 5 days ago

Hello,

I don't understand why this error appears:

SQLSTATE[HY000] [1045] Access denied for user 'solusipay'@'localhost' (using password: YES) (SQL: select * from user_web where email = [email protected] limit 1)

DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=ids DB_USERNAME=******** DB_PASSWORD=********

17th October, 2018

davy_yg left a reply on LEFT JOIN • 6 days ago

Why I cannot use '*' and have to define each one by one? Is there any duplicate value?

davy_yg left a reply on LEFT JOIN • 6 days ago

Where should I insert the alias in the query? I try and it does not work.

davy_yg left a reply on LEFT JOIN • 6 days ago

That part works! Now I realize that I need to add one more table:

alter view v_r_solusi_order as
select
*, (select count(*) from tb_r_solusiorder bb where bb.kode_promo = aa.kode_promo)
as jumlah
from tb_r_solusiorder aa
LEFT JOIN tb_m_biller ON aa.billerid=tb_m_biller.biller_id
LEFT JOIN tb_m_biller_solusi ON aa.billerid=tb_m_biller_solusi.Billerid AND aa.productid=tb_m_biller_solusi.Productid
where aa.kode_promo is not null

Duplicate column name 'Billerid'

I wonder why?

davy_yg started a new conversation LEFT JOIN • 6 days ago

Hello,

I wonder when I run the following sql statement I get an error message:

select 
*, (select count(*) from tb_r_solusiorder bb where bb.kode_promo = aa.kode_promo)
as jumlah
from tb_r_solusiorder aa
where aa.kode_promo is not null 
LEFT JOIN tb_m_biller ON aa.billerid=tb_m_biller.biller_id

It all works until I add this line:

LEFT JOIN tb_m_biller ON aa.billerid=tb_m_biller.biller_id

I get this error message:

SQL Error (1064): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'LEFT JOIN tb_m_biller ON aa.billerid=tb_m_biller.biller_id' at line 6

I wonder what's wrong?

16th October, 2018

davy_yg started a new conversation Edit Passing Id • 1 week ago

recipient_list.blade.php

<td align="center">
                <a href="{{ url('edit-recipient').'/'.$item->rpt_id }}"><i class="fa fa-edit"></i> Edit</a>
                <a href="{{ url('delete-recipient') }}"><i class="fa fa-remove"></i> Delete</a> 
    </td>

web.php

Route::get('edit-recipient/{id}','[email protected]');

ReportController.php

public function editRecipient(Request $request) {

        $rpt_id = $request->rpt_id;

        dd($rpt_id);
    
        $recipient = RecipientModel::find($rpt_id);

        return view('pages.report.create_recipient')
                ->with('data', $recipient);
    }

http://localhost/ids-api/public/edit-recipient/1

I wonder why $rpt_id = null ?

davy_yg started a new conversation Comparing Date And Datetime • 1 week ago

DashboardController.php

public function searchViewTrxHarian(Request $request) {

        $data1 = date("Y-m-d", strtotime($request->start_date));
        $data2 = date("Y-m-d", strtotime($request->expire_date));

        $trxharianPromo = TrxHarianModel::where(date("Y-m-d",'paydate'), '>', $data1)
                        ->where(date("Y-m-d",'paydate'), '<', $data2)
                        ->get();    

         return view('pages.dashboard.dashboardTrxHarian')
                ->with('list', $Report)
                ->with('date1', $data1)
                ->with('date2', $data2);

        }

Hello,

I think I am getting error when converting the paydate into date only since paydate is date and time.

SQLSTATE[42S22]: Column not found: 1054 Unknown column '' in 'where clause' (SQL: select * from tb_r_solusiorder left join tb_m_biller_solusi on tb_r_solusiorder.productid = tb_m_biller_solusi.Productid and tb_r_solusiorder.billerid = tb_m_biller_solusi.Billerid left join tb_m_biller on tb_r_solusiorder.billerid = tb_m_biller.biller_id where > 2018-08-01 and < 2018-08-31)

Any clue how to fix this error message?

davy_yg started a new conversation Daily Promo Transaction • 1 week ago

Hello,

I get the $trxharianPromo list already and I need one more field pass to the view, which shows $count_promo . This field is obtained by counting the number of the same promo_code in the whole field. Any clue how? and should print the number of the same promo_code in each row.

DashboardController.php

public function TrxHarianPromo(){

    $trxharianPromo = TrxHarianModel::get();

    //$promo_code = TrxHarianModel::select('kode_promo')
    //          ->get();

    // dd($promo_code->kode_promo);         
    // $count_promo = TrxHarianModel::select('Orderid')
    //              ->where('kode_promo', '=', $promo_code)
    //              ->count();

    return view('pages.dashboard.dashboardThxHarianPromo')
            ->with('list', $trxharianPromo);
            //->compact('count_promo', $count_promo);
}

davy_yg left a reply on Understanding Codes • 1 week ago

This is kindda of strange to me:

value="{{ ($data) ? $data->nama : old('nama') }}">

If $data has value which means edit then shows previous $data->nama if it is empty which means create why shows old('nama') - old value?

15th October, 2018

davy_yg started a new conversation Understanding Codes • 1 week ago

Please help me understand these codes. The same script is being used for both edit and create. I cannot understand why if there is $data then shows the value, if not then old('nama'). Why old('nama') instead of "". ?

In create it should be empty right?

create_recipient.blade.php

<form id="myForm" action="{{ ($data != "") ? url('/edit-recipient') : url('/save-recipient') }}" method="post" enctype="multipart/form-data">
                @csrf
                <input type="hidden" name="promoId" value="{{ ($data) ? $data->id : "" }}" />
                
                <b>Create Recipient</b>

                
                <input type="hidden" name="recipientId" value="{{ ($data) ? $data->id : "" }}" />
                <div class="form-group">
                    <label style="font-weight:500">Nama</label>
                    <input class="form-control" name="nama" type="text" placeholder="" value="{{ ($data) ? $data->nama : old('nama') }}">
                </div>
                <div class="form-group">
                    <label style="font-weight:500">Email</label>
                    <input class="form-control" name="email" type="text" placeholder="" value="{{ ($data) ? $data->email : old('email') }}">
                </div>          
                
                <br>
                                    
                
                <button class="btn btn-primary">Submit</button>
                <input type="button" onclick="clearFunction()" style="color:#495057" class="btn btn-warning" value="Clear">

            </form>

davy_yg started a new conversation Unexpected Return • 1 week ago

syntax error, unexpected 'return' (T_RETURN)

I wonder why the error appears?

ReportController.php

public function editRecipient(Request $request) {

        $rpt_id = $request->rpt_id;
        $recipient = RecipientModel::find($rpt_id)

        return view('pages.report.create_recipient')
                ->with('data', $recipient);
    }

davy_yg started a new conversation Class 'App\Model\RecipientModel' Not Found • 1 week ago

Hello,

I cannot understand why I get this error message:

Class 'App\Model\RecipientModel' not found

app\Model\RecipientModel.php

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class RecipientModel extends Model
{
    //
    protected $table = 'tb_m_recipient';

}

use App\Model\RecipientModel;

public function submitRecipient(Request $request) {

        $input = $request->validate(
            [
                'nama_rpt' => 'required',
                'email_rpt' => 'required',                                    
            ], [
                'nama_rpt.required' => 'Nama Recipient is required',
                'email_rpt.required' => 'Email Recipient is required'                                
            ]
        );

        $recipientModel = new RecipientModel();
        $recipientModel->nama = $request->get('nama_rpt');
        $recipientModel->email = $request->get('email_rpt');                
        $recipientModel->save();
    
        return back()->with('success', 'Information created successfully.');
    }

davy_yg started a new conversation Scheduling Auto Email • 1 week ago

Hello,

I am trying to make a scheduling auto email. I have the report to send to a list of recipient. Any advice how to add the auto email schedule?

I have to be able to select the day and time. So I don't know what is the best method to input this thing?

Later on I have to set up the cron job.

14th October, 2018

davy_yg left a reply on Date Filter • 1 week ago

I figure that one out. I updated my question. Please re-check thanks.

davy_yg started a new conversation Date Filter • 1 week ago

Hello,

I am trying to create a date filter for the report:

ReportController.php

public function searchViewReport(Request $request) {
        $data1 = date("Y-m-d", strtotime($request->start_date));
        $data2 = date("Y-m-d", strtotime($request->expire_date));

        $Report = ReportModel::leftJoin('tb_m_biller_solusi', function($join){
                $join->on('tb_r_solusiorder.productid', '=', 'tb_m_biller_solusi.Productid');
                $join->on('tb_r_solusiorder.billerid', '=', 'tb_m_biller_solusi.Billerid');            
        })
        ->leftJoin('tb_m_biller', 'tb_r_solusiorder.billerid', '=', 'tb_m_biller.biller_id')
         ->where('paydate', '>', $data1)
        ->where('paydate', '<', $data2)

        return view('pages.report.list')
                ->with('list', $Report)
                ->with('date1', $data1)
                ->with('date2', $data2);
    }

report/list.blade.php

<form action="{{ url('/search-viewreport') }}" method="post">
            @csrf
            <div style="float:left;padding-left: 15px;padding-top: 15px;">
            <input class="form-control" name="start_date" type="date" value="{{ $date1 }}"></td>
            </div>
            <div style="float:left;padding-left: 15px;padding-top: 15px;">
            <label style="font-weight:500">s.d</label>
            </div>
            <div style="float:left;padding-left: 15px;padding-top: 15px;">
            <input class="form-control" name="expire_date" type="date" placeholder="Expired Date" value="{{ $date2 }}"></td>
            </div>
            <div style="float:left;padding-top: 15px;">
            &nbsp;
            <button class="btn btn-primary" onclick=""><i class="fa fa-edit"></i> Search</button></td>
            </div>
    </form> 

I get this error message:

syntax error, unexpected 'return' (T_RETURN)

I wonder why there is error on this line:

return view('pages.report.list')

12th October, 2018

davy_yg left a reply on Export • 1 week ago

What should be in : App\ReportExport ?

Class 'App\ReportExport' not found

This is my ReportController which shows the data that I show in the table:

ReportController.php

class ReportController extends Controller
{

    // excel 
 private $excel;

    public function __construct(Excel $excel)
    {
        $this->excel = $excel;
    }

    public function export()
    {
        return $this->excel->download(new ReportExport, 'report.xlxs');
    }

    // excel ends   

    public function listReport(Request $request) {

        $report = ReportModel::leftJoin('tb_m_biller_solusi', function($join){
                $join->on('tb_r_solusiorder.productid', '=', 'tb_m_biller_solusi.Productid');
                $join->on('tb_r_solusiorder.billerid', '=', 'tb_m_biller_solusi.Billerid');            
        })
            ->leftJoin('tb_m_biller', 'tb_r_solusiorder.billerid', '=', 'tb_m_biller.biller_id')        
            ->get();

    
        return view('pages.report.list')
                ->with('list', $report);
    
    }     

}

When I press Export Report it shows the excel file tables.

report/list.blade.php

<div class="card-header">
          <div style="float:left">
            <i class="fa fa-table"></i> Reports
        </div>
        <div style="float:right">
            <a class="btn btn-primary" href="{{ url('/create-report') }}" id="toggleNavColor">
                Export Report
            </a>
        </div>
    </div>

davy_yg left a reply on Today's Date • 1 week ago

Then I try to compare the date with date and time. As long as the date is the same without considering the time, then it should be counted.

$count_tgl = TrxHarianModel::select('paydate')
                 ->where('paydate', '=', $today)
                 ->count();

davy_yg started a new conversation Today's Date • 1 week ago

I want to capture today's date. How to do so?

$date = new DateTime();

    $today = date('yy-mm-dd');

    dd($today);  

I put this script in the controller. I wonder why it keep bypassing the dd($today)?

davy_yg left a reply on Make Model • 1 week ago

I finally find the file is right under app instead of the Model Folder.

11th October, 2018

davy_yg left a reply on Export • 1 week ago

I get this command:

C:\xampp\htdocs\ids-api>php artisan make:export ReportExport --model=ReportModel

Command "make:export" is not defined.

davy_yg started a new conversation Export • 1 week ago

Hello,

I wonder how the export command works in laravel?

I am following this tutorial: https://laravel-excel.maatwebsite.nl/3.0/exports/

and still do not understand how to export this data:

public function listReport(Request $request) {

        $report = ReportModel::leftJoin('tb_m_biller_solusi', function($join){
                $join->on('tb_r_solusiorder.productid', '=', 'tb_m_biller_solusi.Productid');
                $join->on('tb_r_solusiorder.billerid', '=', 'tb_m_biller_solusi.Billerid');            
        })
            ->leftJoin('tb_m_biller', 'tb_r_solusiorder.billerid', '=', 'tb_m_biller.biller_id')        
            ->get();

    
            return view('pages.report.list')
                ->with('list', $report);
    
    }

This is the button:

report.list.blade.php

<div class="card mb-3">
        <div class="card-header">
        <div style="float:left">
            <i class="fa fa-table"></i> Reports
        </div>
        <div style="float:right">
                <a class="btn btn-primary" href="{{ url('/create-report') }}" id="toggleNavColor">
                Export Report
            </a>
        </div>
    </div>

davy_yg started a new conversation Make Model • 1 week ago

There is something strange. I am trying to make new model by typing this in the artisan:

C:\xampp\htdocs\ids-api>php artisan make:model ReportModel

Model created successfully.

C:\xampp\htdocs\ids-api>

Yet, the ReportModel does not exist in the ids-api files.

davy_yg left a reply on Custom Menu • 1 week ago

I have to comment out the

e.preventDefault();

To make the other navigation works. Yet, the slideToggle turn off.

If I turn the e.preventDefault() on the the slideToggle works but the other navigation is unclickable.

10th October, 2018

davy_yg left a reply on Custom Menu • 1 week ago

I cannot understand why mine does not work.

davy_yg left a reply on Custom Menu • 1 week ago

The slideToggle does not work out yet.

I am using this for the jquery link: https://code.jquery.com/jquery-3.3.1.min.js

davy_yg started a new conversation Custom Menu • 1 week ago

Hello,

I am trying to create a dropdown menu that you can open and hide every time you click it.

navigation.blade.php

<li class="nav-item {{ Request::segment(1) == 'viewtransaksi' ? 'active' : '' }}" data-toggle="tooltip" data-placement="right" title="Charts">
        <a class="nav-link" href="{{ url('/report') }}">
            <i class="fa fa-fw fa-table"></i>
            <span class="nav-link-text">Report</span>
        </a>

          <ul>
            <li class='has-sub'><a href='#'><span>Product 1</span></a>                  
            </li>
            <li class='has-sub'><a href='#'><span>Product 2</span></a>                  
            </li>
          </ul>
    </li>  

sb-admin.js

$( ".nav-item" ).click(function() {
    $( ".has-sub" ).slideToggle( "slow", function() {
        // Animation complete.
    });
});

sb-admin.css

.has-sub, a:link{
    padding: 10px;
    color: white;
    text-decoration: none;
}

davy_yg left a reply on Li.open • 1 week ago

I wonder if all the same class name called .siblings ()

davy_yg left a reply on Li.open • 1 week ago

Cek this - http://cssmenumaker.com/menu/slabbed-accordion-menu

there is no open class in html. Why it is being used in the style.css and script.js ?

davy_yg started a new conversation Li.open • 1 week ago

What is li.open ? It is my first time hearing it.

#cssmenu > ul > li.open > a {

color: #eeeeee;
background: #1fa0e4;
background: -webkit-linear-gradient(#1fa0e4, #1992d1);
background: -moz-linear-gradient(#1fa0e4, #1992d1);
background: -o-linear-gradient(#1fa0e4, #1992d1);
background: -ms-linear-gradient(#1fa0e4, #1992d1);
background: linear-gradient(#1fa0e4, #1992d1);

}

davy_yg left a reply on Asset() • 1 week ago

My assets folder is on:

resources/assets

davy_yg left a reply on Asset() • 1 week ago

davy_yg started a new conversation Asset() • 1 week ago

Hello,

I wonder if I type -

What folder will it address?

davy_yg left a reply on Dropdown Menu • 1 week ago

It does not work. Is this bootstrap?

davy_yg started a new conversation Dropdown Menu • 1 week ago

How to create dropdown menu?

It's left side horizontal menu. I would like to add 2 more menu under Report and it has to be 2 submenu under report. Noted that this is a vertical navigation.

navigation.blade.php

<li class="nav-item {{ Request::segment(1) == 'viewtransaksi' ? 'active' : '' }}" data-toggle="tooltip" data-placement="right" title="Charts">
      <a class="nav-link" href="{{ url('/viewtransaksi') }}">
        <i class="fa fa-fw fa-table"></i>
        <span class="nav-link-text">Transaksi SolusiPay</span>
      </a>
    </li>

    <li class="nav-item {{ Request::segment(1) == 'viewtransaksi' ? 'active' : '' }}" data-toggle="tooltip" data-placement="right" title="Charts">
      <a class="nav-link" href="{{ url('/report') }}">
        <i class="fa fa-fw fa-table"></i>
        <span class="nav-link-text">Report</span>
      </a>
    </li>

Thanks in advance.

9th October, 2018

davy_yg left a reply on Remove Class • 2 weeks ago

This also does not works:

<head>
<style>

.press { 
        color:red;
        }      
   
.black {
    color:black;
        }

 </style>
 </head>

 <h1 class="press">Title</h1>

 <button class="btn1">Btn1</button>
 <button class="btn2">Btn2</button>

 <script>

 document.querySelector('.btn1').classList.remove('press');
 document.querySelector('.btn2').classList.add('black');


 </script>

@s4muel : your code does not work either.

Edit Your Profile
Update

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