Topic | Details |
---|---|
Source Link | Laravel Naming Conventions |
Guideline Followed: | :badge[No]{type="danger"} |
Details: | Methods in your models in Laravel projects, like all methods in your Laravel projects, should be camelCase with the first character lower case. |
GitHub Link | City.php |
::badge{type="danger"} Bad Code ::
<?php
public static function full_city_list()
{
$city = Self::pluck('name','id')->toArray();
return $city;
}
::badge{type="success"} Correct Code ::
public static function full_city_list()
{
$city = Self::pluck('name','id')->toArray();
return $city;
}