fix vendor

This commit is contained in:
2024-07-08 16:20:25 +03:00
parent 2f2310e739
commit 0b53fce31b
1882 changed files with 436 additions and 181884 deletions

View File

@ -0,0 +1,24 @@
<?php
namespace app\controllers;
use app\helpers\Debug;
use app\models\Post;
class PostController
{
public function actionCreatePost($post, $user_id)
{
return Post::create(['post'=>$post, 'user_id'=>$user_id]);
}
public function actionIndex(): void
{
Debug::dd("Post list");
foreach (Post::all() as $post)
{
echo $post->post . "<br>";
}
}
}