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