Skip to content

Instantly share code, notes, and snippets.

View ronokdev's full-sized avatar
🎯
Focusing

Farhan Fuad Ronok ronokdev

🎯
Focusing
View GitHub Profile
@ronokdev
ronokdev / Connect & Raw Query From a Second Database (Laravel 5.6)
Last active March 25, 2018 03:41
Connect & Raw Query From a Second Database (Laravel 5.6)
1. Open → config/database.php & Search for 'mysql'
2. Add new Mysql Connection like below (Laravel 5.6) →
'mysql_2' => [
'driver' => 'mysql',
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => 'dbName',
'username' => 'Username',
'password' => 'Pass',
@ronokdev
ronokdev / Excel Download Via Laravel (maatwebsite)
Last active April 9, 2018 04:50
Excel Download Via Laravel maatwebsite
# Ref URL → https://laravel-excel.maatwebsite.nl/docs/3.0/getting-started/installation
# Run the command in CLI →
composer require maatwebsite/excel
# Add the ServiceProvider in app/config/app.php →
'providers' =>
[
Maatwebsite\Excel\ExcelServiceProvider::class,
@ronokdev
ronokdev / Deploy Vue Project In Centos
Last active March 27, 2018 08:29
Deploy Vue Project In Centos
RefURL → https://medium.com/@Web_Bailey/deploy-a-vuejs-app-with-digitalocean-fd6e7af07e40
# Deploy your project via GIT or something on the server
# Go to the project Directory
# Run → npm install
# Run → npm run build
→ This command will Create a 'dist' folder.
# Go to path → /etc/httpd/conf
→ Add ::
LISTEN 8855
@ronokdev
ronokdev / Access Laravel Api from Different Domain
Last active March 27, 2018 08:30
Access Laravel Api from Different Domain
# Add
→ Go to path :: ProjectName\public\index.php
→ header("Access-Control-Allow-Origin: *");
@ronokdev
ronokdev / Set a Global Vue Instance
Last active March 28, 2018 20:21
Set a Global Vue Instance
::: RefUrl → https://vuejs.org/v2/cookbook/adding-instance-properties.html#Base-Example
::: Set Global instance in index.js (src/router)
→ Vue.prototype.$VariableName = Value;
→ Example : Vue.prototype.$_serverName = window.location.hostname;
→ $ is a convention Vue uses for properties that are available to all instances.
::: Access it from any Vue Components
→ export default {
created:function () {
@ronokdev
ronokdev / Amchart integration With Vue-Js
Last active March 29, 2018 21:53
Amchart integration With Vue-Js
::: Create A project with vue clI
::: Download Amchart JS file's from this URL
→ https://www.amcharts.com/download/
::: Extract in
→ vueProjectName/static/
::: Include All Js Files in the vueProjectName/index.HTML file
// **Path
@ronokdev
ronokdev / Axis Color for Amchart Serial Chart
Created April 3, 2018 04:49
Axis Color for Amchart Serial Chart
::: RefUrl for Dataloader → https://github.com/amcharts/dataloader
::: We are using "dataLoader" to load the data on Amchart.
::: Dataloader Function →
"dataLoader": {
"url": 'GraphUrl',
"format": "json",
"init": function ( options, chart ) {
console.log( 'Loading started' );
},
"load": function ( options, chart ) {
@ronokdev
ronokdev / Add LabelText On Amchart
Created April 4, 2018 06:43
Add LabelText On Amchart
"graphs": [{
"labelText": "[[value]]"
}],
@ronokdev
ronokdev / Show All Axis Amchart (Serial)
Created April 4, 2018 06:44
Show All Axis Amchart (Serial)
"categoryAxis": {
"autoGridCount":false,
"gridPosition": "start",
"labelRotation": 90,
"autoWrap":true,
"gridCount":1000
},
@ronokdev
ronokdev / Give a name to Amchart
Created April 4, 2018 06:51
Give a name to Amchart
"titles": [
{
"text": "Name",
"size": 14,
"alpha":1,
"color" : "#3f51b5"
}
]