Commit 5aa5be0c by Aung Khant Kyaw

change data migration flow to excel top up flow

parent 16652d11
...@@ -2,16 +2,33 @@ ...@@ -2,16 +2,33 @@
namespace App\Exports; namespace App\Exports;
use App\Models\Data;
use Maatwebsite\Excel\Concerns\FromCollection; use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\WithMapping;
class DatasExport implements FromCollection class DatasExport implements FromCollection, WithHeadings, WithMapping
{ {
/** public function __construct($data)
* @return \Illuminate\Support\Collection {
*/ $this->data = $data;
}
public function collection() public function collection()
{ {
return Data::all('phone', 'service', 'operator', 'date'); return $this->data;
}
public function headings(): array
{
return [
'phone_number'
];
}
public function map($project): array
{
return [
$project->phone
];
} }
} }
<?php
namespace App\Helpers;
class Phone
{
public static function getOperator($phoneNo)
{
$prefix = substr($phoneNo, 3, 2);
if ($prefix >= '74' && $prefix <= '79') {
$operator = "Telenor";
} elseif ($prefix >= '90' && $prefix <= '99') {
if ($prefix == '93') {
$operator = "MEC";
} else {
$operator = "Ooredoo";
}
} elseif ($prefix >= '30' && $prefix <= '39') {
$operator = "MEC";
} elseif ($prefix >= '65' && $prefix <= '69') {
$operator = "Mytel";
} else {
$operator = "MPT";
}
return $operator;
}
public static function getAmount($amount)
{
$gettype = gettype($amount);
if ($gettype == "string") {
if (strpos(',', $amount) !== false) {
$getAmount = str_replace(',', '', $amount);
} else {
$getAmount = $amount;
}
} else {
$getAmount = $amount;
}
return $getAmount;
}
}
...@@ -31,7 +31,14 @@ class DataController extends Controller ...@@ -31,7 +31,14 @@ class DataController extends Controller
public function dirtyData() public function dirtyData()
{ {
return view('dirty'); $data = DB::table('data')
->get();
$operator = DB::select(DB::raw("select distinct(operator) from data"));
$amount = DB::select(DB::raw("select distinct(amount) from data"));
$getOperator = "";
$getAmount = "";
return view('dirty', compact('data', 'operator', 'amount', 'getOperator', 'getAmount'));
} }
public function toimport(Request $request) public function toimport(Request $request)
...@@ -76,60 +83,88 @@ class DataController extends Controller ...@@ -76,60 +83,88 @@ class DataController extends Controller
} }
} }
public function dataCleaning() // public function dataCleaning()
// {
// DB::select(DB::raw("
// update data set phone = right(phone, length(phone)-1) where SUBSTRING(phone, 1, 1) = '0'
// "));
// DB::select(DB::raw("
// update data set phone = REGEXP_REPLACE(phone, '[^0-9]+', '');
// "));
// DB::select(DB::raw("
// update data set phone = SUBSTR(phone,2) where SUBSTR(phone, 1, 1) = '0' ;
// "));
// DB::select(DB::raw("
// update data SET phone = SUBSTR(phone,4,LENGTH(phone)) where SUBSTRING(phone, 1, 3) = '959' ;
// "));
// DB::select(DB::raw("
// update data SET phone = SUBSTR(phone,3,LENGTH(phone)) where SUBSTRING(phone, 1, 2) = '95' and length(phone)=11 ;
// "));
// DB::select(DB::raw("
// update data SET phone = SUBSTR(phone,2,LENGTH(phone)) where SUBSTRING(phone, 1, 1) = '9' and length(phone)=10 ;
// "));
// DB::select(DB::raw("
// delete from data where length(phone) > 13
// "));
// DB::select(DB::raw("
// delete from data where length(phone) < 6
// "));
// DB::select(DB::raw("
// update data set date = '2020-01-01' where date = '';
// "));
// }
// public function getDirtyData()
// {
// $data = DB::table('data')
// // ->where('operator', '=', null)
// // ->orWhere('operator', '=', "")
// // ->whereRaw('length(phone) > 9')
// ->get();
// return DataTables::of($data)->make(true);
// }
public function dataExport(Request $request)
{ {
DB::select(DB::raw(" if (!$request->all()) {
update data set phone = right(phone, length(phone)-1) where SUBSTRING(phone, 1, 1) = '0' return redirect('data-dirty');
")); }
DB::select(DB::raw("
update data set phone = REGEXP_REPLACE(phone, '[^0-9]+', '');
"));
DB::select(DB::raw("
update data set phone = SUBSTR(phone,2) where SUBSTR(phone, 1, 1) = '0' ;
"));
DB::select(DB::raw("
update data SET phone = SUBSTR(phone,4,LENGTH(phone)) where SUBSTRING(phone, 1, 3) = '959' ;
"));
DB::select(DB::raw("
update data SET phone = SUBSTR(phone,3,LENGTH(phone)) where SUBSTRING(phone, 1, 2) = '95' and length(phone)=11 ;
"));
DB::select(DB::raw("
update data SET phone = SUBSTR(phone,2,LENGTH(phone)) where SUBSTRING(phone, 1, 1) = '9' and length(phone)=10 ;
"));
DB::select(DB::raw("
delete from data where length(phone) > 13
"));
DB::select(DB::raw("
delete from data where length(phone) < 6
"));
DB::select(DB::raw("
update data set date = '2020-01-01' where date = '';
"));
}
public function getDirtyData()
{
$data = DB::table('data')
// ->where('operator', '=', null)
// ->orWhere('operator', '=', "")
// ->whereRaw('length(phone) > 9')
->get();
return DataTables::of($data)->make(true); $getOperator = $request->operator;
} $getAmount = $request->amount;
$getAction = $request->action;
$operator = DB::select(DB::raw("select distinct(operator) from data"));
$amount = DB::select(DB::raw("select distinct(amount) from data"));
if ($getOperator && $getAmount) {
$data = DB::table('data')->where("operator", $getOperator)->where("amount", $getAmount)->get();
} elseif ($getOperator && !$getAmount) {
$data = DB::table('data')->where("operator", $getOperator)->get();
} elseif (!$getOperator && $getAmount) {
$data = DB::table('data')->where("amount", $getAmount)->get();
} else {
$data = DB::table('data')->get();
}
public function dataExport() if ($getAction == "search") {
{ return view('dirty', compact('data', 'operator', 'amount', 'getOperator', 'getAmount'));
$filename = 'phone_' . date("Y-m-d s") . '.csv'; } elseif ($getAction == "all") {
return Excel::download(new DatasExport, '' . $filename . ''); return redirect('data-dirty');
} elseif ($getAction == "export") {
$filename = 'phone_' . date("Y-m-d s") . '.xlsx';
return Excel::download(new DatasExport($data), '' . $filename . '');
} else {
return redirect('removeData');
}
} }
public function removeData() public function removeData()
...@@ -137,33 +172,37 @@ class DataController extends Controller ...@@ -137,33 +172,37 @@ class DataController extends Controller
Service::where('user_id', Auth::id())->delete(); Service::where('user_id', Auth::id())->delete();
Data::truncate(); Data::truncate();
return redirect('data-dirty');
} }
public function getOperator() // public function getOperator()
{ // {
DB::select(DB::raw(" // DB::select(DB::raw("
update data set operator = 'telenor' where SUBSTRING(phone, 1, 2) >= '74' and SUBSTRING(phone, 1, 2) <= '79' // update data set operator = 'telenor' where SUBSTRING(phone, 1, 2) >= '74' and SUBSTRING(phone, 1, 2) <= '79'
")); // "));
DB::select(DB::raw(" // DB::select(DB::raw("
update data set operator = 'ooredoo' where SUBSTRING(phone, 1, 2) >= '90' and SUBSTRING(phone, 1, 2) <= '99' // update data set operator = 'ooredoo' where SUBSTRING(phone, 1, 2) >= '90' and SUBSTRING(phone, 1, 2) <= '99'
")); // "));
DB::select(DB::raw(" // DB::select(DB::raw("
update data set operator = 'mytel' where SUBSTRING(phone, 1, 2) >= '60' and SUBSTRING(phone, 1, 2) <= '69' // update data set operator = 'mytel' where SUBSTRING(phone, 1, 2) >= '60' and SUBSTRING(phone, 1, 2) <= '69'
")); // "));
DB::select(DB::raw(" // DB::select(DB::raw("
update data set operator = 'mec' where SUBSTRING(phone, 1, 2) in ('93','73') // update data set operator = 'mec' where SUBSTRING(phone, 1, 2) in ('93','73')
")); // "));
// DB::select(DB::raw("
// update data set operator = 'mec' where SUBSTRING(phone, 1, 2) >= '30' and SUBSTRING(phone, 1, 2) <= '39'
// "));
// DB::select(DB::raw("
// update data set operator = 'mpt' where operator is null
// "));
// }
DB::select(DB::raw("
update data set operator = 'mec' where SUBSTRING(phone, 1, 2) >= '30' and SUBSTRING(phone, 1, 2) <= '39'
"));
DB::select(DB::raw("
update data set operator = 'mpt' where operator is null
"));
}
} }
...@@ -6,7 +6,8 @@ use App\Models\Data; ...@@ -6,7 +6,8 @@ use App\Models\Data;
use Maatwebsite\Excel\Concerns\ToModel; use Maatwebsite\Excel\Concerns\ToModel;
use Maatwebsite\Excel\Concerns\WithChunkReading; use Maatwebsite\Excel\Concerns\WithChunkReading;
use Maatwebsite\Excel\Concerns\WithBatchInserts; use Maatwebsite\Excel\Concerns\WithBatchInserts;
use PhpOffice\PhpSpreadsheet\Shared\Date; // use PhpOffice\PhpSpreadsheet\Shared\Date;
use App\Helpers\Phone;
class DataImport implements ToModel, WithBatchInserts, WithChunkReading class DataImport implements ToModel, WithBatchInserts, WithChunkReading
{ {
...@@ -26,17 +27,18 @@ class DataImport implements ToModel, WithBatchInserts, WithChunkReading ...@@ -26,17 +27,18 @@ class DataImport implements ToModel, WithBatchInserts, WithChunkReading
public function model(array $row) public function model(array $row)
{ {
++$this->rows; ++$this->rows;
if (!isset($row[1])) { // if (!isset($row[1])) {
$date = ""; // $date = "";
} else { // } else {
$date = Date::excelToDateTimeObject($row[1])->format('Y-m-d'); // $date = Date::excelToDateTimeObject($row[1])->format('Y-m-d');
} // }
return new Data([ return new Data([
'phone' => $row[0], 'phone' => $row[0],
'service' => $this->sname, 'service' => $this->sname,
// 'date' => $row[1] 'operator' => Phone::getOperator($row[0]),
'date' => $date 'amount' => ((count($row) > 1) ? Phone::getAmount($row[1]) : 0),
'date' => date("Y-m-d")
]); ]);
} }
......
...@@ -6,5 +6,5 @@ use Illuminate\Database\Eloquent\Model; ...@@ -6,5 +6,5 @@ use Illuminate\Database\Eloquent\Model;
class Data extends Model class Data extends Model
{ {
protected $fillable = ['phone', 'service', 'operator', 'date']; protected $fillable = ['phone', 'service', 'operator', 'date', 'amount'];
} }
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddAmountToDataTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('data', function (Blueprint $table) {
$table->string('amount');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('data', function (Blueprint $table) {
//
});
}
}
...@@ -11,7 +11,38 @@ ...@@ -11,7 +11,38 @@
@section('content') @section('content')
<div> <div class="container mb-5">
<div class="my-3">
<form class="form-inline" method="POST" action="{{ route('dataExport') }}">
@csrf
<div class="form-group mb-2">
<label for="operator">Operator :</label>
{{-- <input type="text" class="form-control ml-2" autocomplete="off" name="operator" id="operator" placeholder="Operator" value="{{ $operator ? $operator : "" }}"> --}}
<select class="form-control ml-2" name="operator" id="operator" placeholder="Operator">
<option value=""></option>
@foreach ($operator as $item)
<option value="{{ $item->operator }}" {{ ($item->operator == $getOperator) ? 'selected' : "" }}> {{ $item->operator }} </option>
@endforeach
</select>
</div>
<div class="form-group mx-sm-3 mb-2">
<label for="amount">Amount :</label>
{{-- <input type="text" class="form-control ml-2" autocomplete="off" name="amount" id="amount" placeholder="Amount" value="{{ $amount ? $amount : "" }}"> --}}
<select class="form-control ml-2" name="amount" id="amount" placeholder="Amount">
<option value=""></option>
@foreach ($amount as $item)
<option value="{{ $item->amount }}" {{ ($item->amount == $getAmount) ? 'selected' : "" }}> {{ $item->amount }} </option>
@endforeach
</select>
</div>
<button type="submit" name="action" value="search" class="btn btn-success mb-2">Search</button>
<button type="submit" name="action" value="all" class="btn btn-primary mb-2 ml-2">All</button>
<button type="submit" name="action" value="export" class="btn btn-primary mb-2 ml-2">Export</button>
<button type="submit" name="action" value="delete" class="btn btn-danger mb-2 ml-2">Delete</button>
</form>
</div>
<div class="my-3"> <div class="my-3">
@if(session('row')) @if(session('row'))
<div class="alert alert-success alert-dismissible fade show" role="alert"> <div class="alert alert-success alert-dismissible fade show" role="alert">
...@@ -29,13 +60,22 @@ ...@@ -29,13 +60,22 @@
<tr> <tr>
<th>Id</th> <th>Id</th>
<th>Phone</th> <th>Phone</th>
<th>Service</th>
<th>Operator</th> <th>Operator</th>
<th>Date</th> <th>Amount</th>
<th>Created At</th> <th>Created At</th>
<th>Updated At</th>
</tr> </tr>
</thead> </thead>
<tbody>
@foreach ($data as $item)
<tr>
<td>{{ $item->id }}</td>
<td>{{ $item->phone }}</td>
<td>{{ $item->operator }}</td>
<td>{{ $item->amount }}</td>
<td>{{ $item->date }}</td>
</tr>
@endforeach
</tbody>
</table> </table>
</div> </div>
</div> </div>
...@@ -46,64 +86,65 @@ ...@@ -46,64 +86,65 @@
<script> <script>
let table = $('#example').DataTable({ let table = $('#example').DataTable({
dom: "<'row'<'col-sm-12 col-md-2'l><'col-sm-12 col-md-4'B><'col-sm-12 col-md-6'f>>" + "<'row'<'col-sm-12'tr>>" + "<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>", // dom: "<'row'<'col-sm-12 col-md-2'l><'col-sm-12 col-md-4'B><'col-sm-12 col-md-6'f>>" + "<'row'<'col-sm-12'tr>>" + "<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
lengthMenu: [[10, 25, 50, -1], [10, 25, 50, "All"]], lengthMenu: [[10, 25, 50, -1], [10, 25, 50, "All"]],
buttons: [ // buttons: [
// { extend: 'excel', className: 'mr-3 mydtbtn' }, // { extend: 'excel', className: 'mr-3 mydtbtn' },
// { extend: 'csv',text: 'Export CSV', className: 'mr-3 mydtbtn' }, // { extend: 'csv',text: 'Export CSV', className: 'mr-3 mydtbtn' },
{ // {
text: 'Clean', // text: 'Clean',
className: 'mr-2 mydtbtn', // className: 'mr-2 mydtbtn',
action: function ( e, dt, node, config ) { // action: function ( e, dt, node, config ) {
axios.get('{!! url('dataCleaning') !!}') // axios.get('{!! url('dataCleaning') !!}')
.then(({data}) => { // .then(({data}) => {
this.ajax.reload(); // this.ajax.reload();
}) // })
}, // },
}, // },
{ // {
text: 'Get Operator', // text: 'Get Operator',
className: 'mr-2 mydtbtn', // className: 'mr-2 mydtbtn',
action: function ( e, dt, node, config ) { // action: function ( e, dt, node, config ) {
axios.get('{!! url('getOperator') !!}') // axios.get('{!! url('getOperator') !!}')
.then(({data}) => { // .then(({data}) => {
this.ajax.reload(); // this.ajax.reload();
}) // })
}, // },
}, // },
{ // {
text: 'CSV(phone)', // text: 'Export',
className: 'mr-2 mydtbtn', // className: 'mr-2 mydtbtn',
action: function ( e, dt, node, config ) { // action: function ( e, dt, node, config ) {
window.open('{!! url('dataExport') !!}') // window.open('{!! url('dataExport') !!}')
}, // },
}, // },
{ // {
text: 'Del', // text: 'Del',
className: 'mydtbtn', // className: 'mydtbtn',
action: function ( e, dt, node, config ) { // action: function ( e, dt, node, config ) {
axios.get('{!! url('removeData') !!}') // axios.get('{!! url('removeData') !!}')
.then(({data}) => { // .then(({data}) => {
this.ajax.reload(); // this.ajax.reload();
}) // })
}, // },
}, // },
], // ],
responsive: true, responsive: true,
processing: true, processing: true,
serverSide: true, serverSide: false,
ajax: '{!! url('getDirtyData') !!}', // ajax: '{!! url('getDirtyData') !!}',
columns: [ // columns: [
{ data: 'id', name: 'id' }, // { data: 'id', name: 'id' },
{ data: 'phone', name: 'phone' }, // { data: 'phone', name: 'phone' },
{ data: 'service', name: 'service' }, // { data: 'operator', name: 'operator' },
{ data: 'operator', name: 'operator' }, // { data: 'amount', name: 'amount' },
{ data: 'date', name: 'date' }, // { data: 'date', name: 'date' }
{ data: 'created_at', name: 'created_at' }, // ],
{ data: 'updated_at', name: 'updated_at' }
]
}); });
</script> </script>
......
@extends('welcome') @extends('welcome')
@section('content') @section('content')
Home <div class="container bg-white p-4 my-4">
<h2 class="my-3"> Documentation <hr> </h2>
<p style="font-size: 18px;">
This program is a part of <b><a href="#"> Excel Top Up </a></b> Project when you want to perform top up process with different tasks like only one operator or only one amount.
This tiny program will help you to get operators name related to your Phone Numbers. (Myanmar Only)
</p>
<ul>
<li>
<h4>Data Import Page</h4>
<ul>
<li>
First of all, you need to import your datas from <b>
<a href="{{ url('data-import') }}">Data Import</a> Page.</b>
</li>
<li>
If your datas is valid as our rules, you will reach <b>
<a href="{{ url('data-dirty') }}">Data Export</a> Page
</b> and you will see data import success alert.
</li>
<li>
Finally, Do your processes as your wish!
</li>
</ul>
</li>
<br>
<li>
<h4>Data Export Page</h4>
<ul>
<li>
You can seach with operator and amount.
</li>
<li>
All data export function and filtered data export function.
</li>
<li>
Learn more by using this page! Enjoy!
</li>
</ul>
</li>
</ul>
<hr>
<center style="font-size: 18px;" class="text-success">
Thank you for using this program!
</center>
</div>
@endsection @endsection
\ No newline at end of file
...@@ -18,9 +18,9 @@ ...@@ -18,9 +18,9 @@
<div class="mb-3"> <div class="mb-3">
<div class="input-group"> <div class="input-group">
<div class="input-group-prepend"> <div class="input-group-prepend">
<span class="input-group-text" id="snamelabel">Service Name</span> <span class="input-group-text" id="snamelabel">Data Amount</span>
</div> </div>
<input type="text" class="form-control" name="sname" aria-describedby="snamelabel" id="sname" required> <input type="text" placeholder="From-To (eg: 1-200)" class="form-control" name="sname" aria-describedby="snamelabel" id="sname" required>
</div> </div>
</div> </div>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>Laravel</title> <title>Get Operator Names</title>
<link rel="stylesheet" href="{{ asset('css/app.css') }}"> <link rel="stylesheet" href="{{ asset('css/app.css') }}">
<link rel="stylesheet" href="{{ asset('css/datatable/dataTables.bootstrap4.min.css') }}"> <link rel="stylesheet" href="{{ asset('css/datatable/dataTables.bootstrap4.min.css') }}">
...@@ -15,23 +15,23 @@ ...@@ -15,23 +15,23 @@
<body> <body>
<nav class="navbar navbar-expand-lg navbar-dark bg-primary"> <nav class="navbar navbar-expand-lg navbar-dark bg-primary">
<div class="container"> <div class="container">
<a class="navbar-brand" href="#">Data Migration</a> <a class="navbar-brand" href="{{ url('/') }}">Get Operators Names</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo02" aria-controls="navbarTogglerDemo02" aria-expanded="false" aria-label="Toggle navigation"> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo02" aria-controls="navbarTogglerDemo02" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span>
</button> </button>
<div class="collapse navbar-collapse" id="navbarTogglerDemo02"> <div class="collapse navbar-collapse" id="navbarTogglerDemo02">
<ul class="navbar-nav mr-auto mt-2 mt-lg-0"> <ul class="navbar-nav ml-auto mt-2 mt-lg-0">
<li class="nav-item {{ (request()->is('/')) ? 'active' : '' }}"> <li class="nav-item {{ (request()->is('/')) ? 'active' : '' }}">
<a class="nav-link" href="{{ url('/') }}">Data</a> <a class="nav-link" href="{{ url('/') }}">Home</a>
</li> </li>
<li class="nav-item {{ (request()->is('data-import')) ? 'active' : '' }}"> <li class="nav-item {{ (request()->is('data-import')) ? 'active' : '' }}">
<a class="nav-link" href="{{ url('data-import') }}">To Import</a> <a class="nav-link" href="{{ url('data-import') }}">Data Import</a>
</li> </li>
<li class="nav-item {{ (request()->is('data-dirty')) ? 'active' : '' }}"> <li class="nav-item {{ (request()->is('data-dirty')) ? 'active' : '' }}">
<a class="nav-link" href="{{ url('data-dirty') }}">To Data Clean</a> <a class="nav-link" href="{{ url('data-dirty') }}">Data Export</a>
</li> </li>
<li class="nav-item active"> <li class="nav-item active">
...@@ -58,12 +58,12 @@ ...@@ -58,12 +58,12 @@
<script src="{{ asset('js/app.js') }}"></script> <script src="{{ asset('js/app.js') }}"></script>
<script src="{{ asset('js/datatable/jquery.dataTables.min.js') }}"></script> <script src="{{ asset('js/datatable/jquery.dataTables.min.js') }}"></script>
<script src="{{ asset('js/datatable/dataTables.bootstrap4.min.js') }}"></script> <script src="{{ asset('js/datatable/dataTables.bootstrap4.min.js') }}"></script>
<script src="{{ asset('js/datatable/dataTables.buttons.min.js') }}"></script> {{-- <script src="{{ asset('js/datatable/dataTables.buttons.min.js') }}"></script>
<script src="{{ asset('js/datatable/buttons.bootstrap4.min.js') }}"></script> <script src="{{ asset('js/datatable/buttons.bootstrap4.min.js') }}"></script> --}}
{{-- <script src="{{ asset('js/datatable/jszip.min.js') }}"></script> --}} {{-- <script src="{{ asset('js/datatable/jszip.min.js') }}"></script> --}}
{{-- <script src="{{ asset('js/datatable/pdfmake.min.js') }}"></script> --}} {{-- <script src="{{ asset('js/datatable/pdfmake.min.js') }}"></script> --}}
<script src="{{ asset('js/datatable/vfs_fonts.js') }}"></script> {{-- <script src="{{ asset('js/datatable/vfs_fonts.js') }}"></script> --}}
<script src="{{ asset('js/datatable/buttons.html5.min.js') }}"></script> {{-- <script src="{{ asset('js/datatable/buttons.html5.min.js') }}"></script> --}}
{{-- <script src="{{ asset('js/datatable/buttons.print.min.js') }}"></script> --}} {{-- <script src="{{ asset('js/datatable/buttons.print.min.js') }}"></script> --}}
{{-- <script src="{{ asset('js/datatable/buttons.colVis.min.js') }}"></script> --}} {{-- <script src="{{ asset('js/datatable/buttons.colVis.min.js') }}"></script> --}}
......
...@@ -24,14 +24,15 @@ Route::middleware('auth')->group(function () { ...@@ -24,14 +24,15 @@ Route::middleware('auth')->group(function () {
Route::get('toimport', [DataController::class, 'toimport'])->name('toimport'); Route::get('toimport', [DataController::class, 'toimport'])->name('toimport');
Route::get('data-dirty', [DataController::class, 'dirtyData']); Route::get('data-dirty', [DataController::class, 'dirtyData']);
Route::get('getDirtyData', [DataController::class, 'getDirtyData']); // Route::get('getDirtyData', [DataController::class, 'getDirtyData']);
Route::get('dataCleaning', [DataController::class, 'dataCleaning']); // Route::get('dataCleaning', [DataController::class, 'dataCleaning']);
Route::get('dataExport', [DataController::class, 'dataExport']); Route::post('dataExport', [DataController::class, 'dataExport'])->name('dataExport');
Route::get('dataExport', [DataController::class, 'dataExport'])->name('dataExport');
// Route::get('serviceExport', [DataController::class, 'serviceExport']); // Route::get('serviceExport', [DataController::class, 'serviceExport']);
Route::get('getOperator', [DataController::class, 'getOperator']); // Route::get('getOperator', [DataController::class, 'getOperator']);
Route::get('removeData', [DataController::class, 'removeData']); Route::get('removeData', [DataController::class, 'removeData']);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment