Laravel model and controller interaction I want to know if I'm going about creating and calling two functions from my model to my controller in the simplest and cleanest way. 

Model:

public function getPosts()
{
    $post = $this-&gt;paginate(4);
    return $post;
}

public function getMonth($post)
{
    $post-&gt;month = date('M', strtotime($this-&gt;created_at));
    $post-&gt;month = strtoupper($post-&gt;month);
    return $post-&gt;month;
}

public function getDay($post)
{
    $post-&gt;day = date('d', strtotime($this-&gt;created_at));
    return $post-&gt;day;
}


Controller: 

public function index()
{
    $post = $this-&gt;post-&gt;getPosts();
    $post-&gt;month = $this-&gt;post-&gt;getMonth($post);
    $post-&gt;day = $this-&gt;post-&gt;getDay($post);

    return View::make('posts.index', compact('post'));
}


I am unsure about if my controller is acting in a strict MVC way, being that I thought it's only job is to direct traffic, but it's doing more by calling functions from my model. Is this the best way to go about this?
PHP is not my area of expertise, so just some generic notes:


4 is a magic number here:


$post = $this-&gt;paginate(4);



Why is it 4? What the purpose if this number? A named constant or local variable would be readable with a descriptive name.

public function getMonth($post)
{
    $post-&gt;month = date('M', strtotime($this-&gt;created_at));
    $post-&gt;month = strtoupper($post-&gt;month);
    return $post-&gt;month;
}



Using a local variable with a proper name, like lowercase_month, in the first line would be readable and more descriptive.
These methods violates Command Query Separation since they return some data and modify the $post too.


  Functions should either do something or answer something, but not both.


Source: Clean Code by Robert C. Martin, Chapter 3: Functions, Command Query Separation p45

$post-&gt;month = date('M', strtotime($this-&gt;created_at));
$post-&gt;month = strtoupper($post-&gt;month);



I'd consider moving these calls to the Post class since it seems data envy. (Pseudocode.)

class Post {
    ...
    public void setMonth($created_at) {
        $lowercase_month = date('M', strtotime($created_at));
        $post-&gt;month = strtoupper($lowercase_month);
    }
    ...
}