Monday, October 3, 2016

https://www.fiverr.com/

https://www.fiverr.com/
考虑freelancer ,这个网站不错 fiverr, 你可以售卖你的IT技能,成功了再辞职

Friday, September 2, 2016

laravel Yajra error -- DataTables warning request unknown parameter id for row 0


1.https://laracasts.com/discuss/channels/eloquent/yajra-laravel-datatables?page=1


2. My reply
For "DataTables warning request unknown parameter id for row 0" please check UsersController is created or not.

If fix the error after I create the UsersController as below.
<pre>
<code class="hljs php">
php artisan make:controller UsersController --plain
</code>
</pre>

Saturday, August 27, 2016

$profile->getFillable()

$fillable[] = $profile->getFillable();
   
foreach ($fillable[0] as $key => $value ) {
    //var_dump("key=".$key);
    //var_dump("value=".$value);
    var_dump("value=".$request[$value]);   
}

Friday, August 19, 2016

To do list 19-Aug-2016

1. Data maintenance for 3 tables.

2. Explore on tabs.

3. Enhance flash message.

4. Dynamic label.

Sunday, August 14, 2016

git clone https://github.com/modestkdr/scrumwala.git

git clone https://github.com/modestkdr/scrumwala.git

Scrum/Agile Web App
Scrumwala is a scrum/agile web app that lets you create and manage projects with plan and work views, group issues in a project into sprints, set deadlines for issues, active sprints and projects and get reminders by email listing issues nearing deadline.

Saturday, August 13, 2016

insert update delete UserController.php

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;

class BloodPressureController extends Controller
{
    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
 

Friday, August 12, 2016

To do list 13-Aug-2016

1. Understand more on laravel setup.

2. try npm install and gulp.

laravel-collections-php-arrays-on-steroids

1. https://scotch.io/tutorials/laravel-collections-php-arrays-on-steroids 
https://github.com/johnkariuki/laravel-collections.git

Laravel collections are one of the most powerful provisions of the Laravel framework. They are what PHP arrays should be, but better.
Laravel collections are what PHP arrays should be, but better.
In this tutorial, we will be going through a few tricks that may be handy when you are working with collections.

Thursday, August 4, 2016

eloquent relationships -- hasOne

1. create public function shape with hasOne relationships
class Member extends Model

    public function shape()
    {
       return $this->hasOne('App\Shape','part_id','part_id');
    }

2. Example with App\Member::with('shape')->find(1);
>>> App\Member::with('shape')->find(1);
=> App\Member {#751
     id: 1,
     part_id: "4882557",
     surname: "KRISHNAN",
     firstname: "KUMARESAN",
     email: "kumar@aeonmalaysia.com.my",
     created_at: "2016-08-04 10:19:56",
     updated_at: "2016-08-04 10:19:56",
     shape: App\Shape {#756
       id: 1,
       part_id: "4882557",
       match_score: "4.00",
       scales_num: "2.00",
       scales_cls: "22.00",
       created_at: "2016-08-04 10:20:05",
       updated_at: "2016-08-04 10:20:05",
     },
   }
>>>

Wednesday, August 3, 2016

flash implementation

1. Reference
https://github.com/laracasts/flash

2. Installation
a. Run composer require laracasts/flash
b. And then, if using Laravel 5, include the service provider within config/app.php.

'providers' => [
    Laracasts\Flash\FlashServiceProvider::class,
];

3.Usage
a. Within your controllers, before you perform a redirect...

public function store()
{
    flash('Welcome Aboard!');

    return home();
}

b. Add include flash message on view.
@include('flash::message')

<!-- This is only necessary if you do Flash::overlay('...') -->
<script src="//code.jquery.com/jquery.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>

<script>
    $('#flash-overlay-modal').modal();
</script>

Tuesday, August 2, 2016

To do list 3-Aug-2016

1.start on pms project
- import / export excel
- maintenance
- show chart

2. Research on high chart alignment

3. Implement Inspinia theme

Monday, August 1, 2016

Friday, July 29, 2016

php artisan db:seed

1. DatabaseSeeder.php
use Illuminate\Database\Seeder;
use Illuminate\Database\Eloquent\Model;

class DatabaseSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        // $this->call(UsersTableSeeder::class);
        $this->call(MarketsTableSeeder::class);      
    }
}

2. MarketsTableSeeder.php
use Illuminate\Database\Seeder;
use App\Market;

class MarketsTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        App\Market::create(['name' => 'Direct Sales', 'val'=>20]);
    }
}

3. You need App\Market model as well

4. run command "php artisan db:seed" on command prompt




5. I having class compile error , try 'composer dump-autoload" and "php artisan clear-compiled"
https://laracasts.com/discuss/channels/general-discussion/php-artisan-dbseed?page=1




Thursday, July 28, 2016

factory faker

factory faker step by step.

1. Add $factory on ModelFactory.php
$factory->define(App\Tenant::class, function (Faker\Generator $faker) {
    return [
        'name' => $faker->name,
        'nric' => $faker->numerify('######-##-####'),
        'dob' => $faker->date
    ];
});

2. run with php artisan tinker
 factory('App\Tenant',20)->create();

3. Reference.
https://github.com/fzaninotto/Faker

sample project with budget 15-20k

Customer is looking for property management application with budget 15-20k.

Scope is similar as application below.

 

To do list 29-Jul-2016

1. Research on high chart.

2. Testing on paginate function.

3. Enhance transaction new/edit/delete function.

CMS link

1. MicroweberCMS Drag and Drop CMS and online shop
https://microweber.com/ 

laravel highchart

Wednesday, July 27, 2016

Question - Laravel where dob like $str not working. dob is a date field.

 Laravel where dob like $str not working. dob is a date field.

For example dob is 1972-05-28. When I search with $str=1972 it not working.

return $this->builder->where('name','
like', '%'.$str.'%')
                                 ->orWhere('nric','like', '%'.$str.'%')
                                 ->orWhere('dob','like', '%'.$str.'%');

-------------------------------------------------
Answer :
            return $this->builder->whereRaw("cast(dob as char(10)) like '%$str%'")
                                 ->orWhere('name','like', '%'.$str.'%')
                                 ->orWhere('nric','like', '%'.$str.'%');

Tuesday, July 26, 2016

Dialy note 27-Jul-2018


1. Current status -- complete deposit prototype.




2.To do list for deposit
   a. rename table name
   b. add move in/out date
   c. add utility amount and comments column
   d. update delete function with change move_out flag value.

3. Add search function on all the index screen.

4.  Start working on rental charge and collection.


    

Thursday, July 21, 2016

Cari form info

1. cari yc_chan
我们有提供做网站的服务, 一站式的服务. 我们也有做custom made 的 system, 完全符合你的要求而设。

从 Domain name + Website + web hosting 包到完 。

http://www.webonhand.com

Whatsapp :014-9254526
email : admin@webonhand.com

2.vronn12345
tideweb.my

3. http://www.grow.my/

Sunday, July 17, 2016

appzcoder crud-generator


1.url
https://packagist.org/packages/appzcoder/crud-generator

2. Crud command: .
php artisan crud:generate Posts --fields="title#string, body#text"
 
3. You can also easily include route, set primary key, set views directory etc 
through options --route, --pk, --view-path as belows: 
php artisan crud:generate Posts --fields="title#string#required, 
body#text#required_with:title|alpha_num" --route=yes --pk=id 
--view-path="admin" --namespace=Admin --route-group=admin 
 
3. These fields are supported for migration and view's form:
  • string
  • char
  • varchar
  • password
  • email
  • date
  • datetime
  • time
  • timestamp
  • text
  • mediumtext
  • longtext
  • json
  • jsonb
  • binary
  • number
  • integer
  • bigint
  • mediumint
  • tinyint
  • smallint
  • boolean
  • decimal
  • double
  • float
  • enum
 

Tuesday, July 5, 2016

sample application 6-Jul-2016

http://laravel-tricks.com/popular
http://builtwithlaravel.com/listing/laravel-tricks

https://github.com/wiwatsrt/laravel-property-management.git

Saturday, July 2, 2016

Tuesday, June 28, 2016

Example str_slug

$str = "this is a test";
$slug = str_slug($str);
var_dump("slug=" .$slug);
$slug2 = $slug . "-2";
var_dump("slug2=" .$slug2);

$pieces = explode("-",$slug2);

$number = intval(end($pieces));

var_dump("number=" .$number);

Daily Note 28-Jun-2016


1. setup timegrid
https://github.com/timegridio/timegrid
https://github.com/timegridio/timegrid/blob/master/INSTALLING.md

2 What next
Study in deep on this framework.

Friday, June 24, 2016

Usefully link


1. glyphicon class
http://www.w3schools.com/bootstrap/bootstrap_ref_comp_glyphs.asp

2. List of open source projects made with Laravel
https://gist.github.com/msurguy/8590765

3.Vocal extends the Eloquent base class, so your models are still fully compatible with Eloquent. Vocal simply intercepts some methods such as validate and save before they're passed to Eloquent.
https://github.com/sjdaws/vocal

4.Josh - Laravel Admin Template + Front End + CRUD
http://codecanyon.net/item/josh-laravel-admin-template-front-end-crud/8754542?ref=jyostna&&utm_source=github&utm_medium=stojan_repo

5.A collection of open-source projects built with the Laravel framework.
http://builtwithlaravel.com/

6.MongoDB based Eloquent model and Query builder
http://builtwithlaravel.com/listing/laravel-mongodb

7.Laravel based CMSs and open source applications
http://learninglaravel.net/laravel-based-cmss-and-open-source-applications

8.PyroCMS is an easy to use, powerful, and modular CMS and development platform built with Laravel 5.
https://github.com/pyrocms/pyrocms

9.Invoice Ninja
https://github.com/invoiceninja/invoiceninja

10. Timegrid helps contractors and customers to find the perfect meeting time through online appointments.
https://github.com/timegridio/timegrid

11. Awesome-opensource-apps
https://github.com/unicodeveloper/awesome-opensource-apps

12. Laravel.io Community Portal
http://laravel.io/forum 

Daily Note 25-Jun-2016

1. explore on Maatwebsite excel traits and enhance my excel function
    Try use traits to build one excel export function.
     Done : Create MaatExcel class

2. Import export excel function on "posts" form.
    Done

3. Add fetchTable class and CommonController.
    Done

4. Looking for billing / transaction laravel application.
    Next step.

Thursday, June 23, 2016

Review: Top 5 Laravel-based CMSs

http://laraveldaily.com/review-top-5-laravel-based-cmss/

Online Business Solution

Good site to reference.

https://www.stooges.com.my/en

JB 的话可以和我合作 ^^.
0167737062 Derrick Yam

Wednesday, June 22, 2016

Daily Note 22-Jun-2016

1. Create downloadExcel function.

2. Retrieve data from compact array
$temp = $data['data'];

3. git commit -m "add downloadExcel into helper function"

4. What next
    Implement export to excel to "posts" CRUD.

Tuesday, June 21, 2016

My project plan 21-Jun-2016

1. New project -- myproj
   Done

2. Setup database on postgres -- under database test scheme public
   Done

3. import Crud Generator
   https://github.com/appzcoder/crud-generator
   Done

4. import Maatwebsite/Laravel-Excel
   https://github.com/Maatwebsite/Laravel-Excel
   Target complete date : 22-Jun-2016. (Done)

5. git initial commit and push the github myproj
    Done

6. Add export excel function on post.show
    Target complete date : 22-Jun-2016.

7. Start design and build property management system
    Target complete date : 31-July-2016.

Thursday, June 16, 2016

git: Crud Generator

1. github
https://github.com/appzcoder/crud-generator

2. setup
php artisan vendor:publish --provider="Appzcoder\CrudGenerator\CrudGeneratorServiceProvider"
php artisan crud:generate Posts --fields="title#string, body#text"

3. Screen dump

Common laravel issues and fix

1.ErrorException in Encrypter.php line 81:
https://laracasts.com/discuss/channels/general-discussion/mcrypt-encrypt-key-of-size-12-not-supported-by-this-algorithm

==> resolve
C:\wamp\www\app>php artisan key:generate
Application key [HaQQ7Mcdfr1KpJ17Khs2P5vrrWWJifUf] set successfully.


2. Maximum function nesting level of '100' reached, aborting!
I fixed this my add this line to bootstrap/autoload.php in LV 5.1

ini_set('xdebug.max_nesting_level', -1);

https://laracasts.com/discuss/channels/general-discussion/l5-maximum-function-nesting-level-of-100-reached-aborting?page=4


3.TokenMismatchException in VerifyCsrfToken.php line 67:
http://laravel.io/forum/01-30-2015-laravel5-tokenmismatchexception-in-verifycsrftoken
<input type="hidden" name="_token" value="{{ csrf_token() }}">

Note 16-Jun-2016

1. Finish lesson incremental api development
https://laracasts.com/series/incremental-api-development
https://github.com/rattfieldnz/laravel-incremental-api.git

2.  fractal provides a presentation and transformation layer for complex data output
    fractal.thephpleague.com

3. php artisan generate:pivot lessons tags   
this will create pivot table refer to CreateLessonTagTable
    public function up()
    {
        Schema::create('lesson_tag', function(Blueprint $table)
        {
            $table->increments('id');
            $table->integer('lesson_id')->unsigned()->index();
            $table->foreign('lesson_id')->references('id')->on('lessons')->onDelete('cascade');
            $table->integer('tag_id')->unsigned()->index();
            $table->foreign('tag_id')->references('id')->on('tags')->onDelete('cascade');
        });
    }

4. thinking about if added new field what is the impact.   

5. abstract class   
Abstract classes are classes that contain one or more abstract methods. An abstract method is a method that is declared, but contains no implementation. Abstract classes may not be instantiated, and require subclasses to provide implementations for the abstract methods.
  
7.  Traits and classes is defined in a way which reduces complexity, and avoids the typical problems associated with multiple inheritance and Mixins

As of PHP 5.4.0, PHP implements a method of code reuse called Traits.

Traits are a mechanism for code reuse in single inheritance languages such as PHP. A Trait is intended to reduce some limitations of single inheritance by enabling a developer to reuse sets of methods freely in several independent classes living in different class hierarchies. The semantics of the combination of Traits and classes is defined in a way which reduces complexity, and avoids the typical problems associated with multiple inheritance and Mixins.

A Trait is similar to a class, but only intended to group functionality in a fine-grained and consistent way. It is not possible to instantiate a Trait on its own. It is an addition to traditional inheritance and enables horizontal composition of behavior; that is, the application of class members without requiring inheritance.

Tuesday, June 14, 2016

My project plan 14-Jun-2016

1. Try to build property management system in two months time. End Date 31-Aug-2016.

2. Use basic MVC to build as long as it work.

3. Explore at less two CRUD to enhance this system.

4. Re-build using simplify framework.

5. Conclusion.

Sunday, June 12, 2016

My project plan 12-Jun-2016

Plan

1. Master on my own laravel framework.
2. Create my own property project.

Job Option

1. Change job with doing php laravel.
     Will start with part time or freelance basic.
2. Looking for part time job or freelance
3. Post deployment maintenance