userfrosting

UserFrosting & AWS SDK

假如想象 提交于 2020-01-15 05:14:10
问题 I have the following code working as expected outside UserFrosting: <?php echo "Hello World.<br>"; require_once '../vendor/autoload.php'; use Aws\Common\Aws; $aws = Aws::factory('../aws/aws-config.json'); $client = $aws->get('S3'); $bucket = 'my-public-public'; $iterator = $client->getIterator('ListObjects', array( 'Bucket' => $bucket )); foreach ($iterator as $object) { echo $object['Key'] . "<br>"; } On my UserFrosting instance I managed to successfully load aws-sdk-php with Composer: -

Uploading a file with twig and Slim framework (Version 2) - PHP

元气小坏坏 提交于 2019-12-30 18:38:53
问题 I'm using UserFrosting a user management system and I'm having some trouble uploading a file through form post, this is what I tried This is how my twig file looks. <form name="eveniment" method="post" action="{{form_action}}" enctype="multipart/form-data"> ... <input type="file" class="form-control" name="poza" id="poza"> ... </form>` This is how my controller looks like $target_dir = "uploads/"; $target_file = $target_dir . basename($_FILES["poza"]["name"]); $uploadOk = 1; $imageFileType =

Userfrosting installation issues

耗尽温柔 提交于 2019-12-11 07:51:31
问题 I did installation of Userfrosting as per the steps - no errors and all went well (using ubuntu 16 command line). When i loaded the site in browser, page did came but no CSS applied. Browser console said - failed to load resource. I checked and found that “asset-raw” folder is not there under userfrosting/public (this is my webroot). Also when clicked on sign-in, it does not work. DO let me know if i missed anything. Thanks Rahul 回答1: If you're using Apache, you need to make sure Mod_Rewrite

Userfrosting: Passing Params, Async Data Fetching

主宰稳场 提交于 2019-12-11 05:30:58
问题 I'm quite new to UF and I'm developing a web tool based on the included tooling. I already read all the tutorials carefully and also mostly understand the basic workflows between PHP, Twig, Slim and JQuery. Even though I'm not a professional in all of these technologies and therefore I have two questions, which hold me a little back on developting the stuff that I want to achieve. Please don't blame me if the questions are some kind of stupid. 1.) What is the "right" / "expected" way to pass

Userfrosting best practice for helper functions

一个人想着一个人 提交于 2019-12-10 11:32:40
问题 What would be the best practice to have custom code (library of functions) in a project using userfrosting? As of now, I modify existing userfrosting controllers, which bloats the nice concise code. I guess there is a nice way to keep custom functions in a place, which will not interfere with Userfrosting's code and thereby not be affected much during userfrosting upgrades. At the moment, i'd like to have some custom functions for notifications, barcode etc. Guess using a vendor folder under

Userfrosting best practice for helper functions

僤鯓⒐⒋嵵緔 提交于 2019-12-06 13:51:05
What would be the best practice to have custom code (library of functions) in a project using userfrosting? As of now, I modify existing userfrosting controllers, which bloats the nice concise code. I guess there is a nice way to keep custom functions in a place, which will not interfere with Userfrosting's code and thereby not be affected much during userfrosting upgrades. At the moment, i'd like to have some custom functions for notifications, barcode etc. Guess using a vendor folder under composer would be ideal? If so, how to go about it? Does userfrosting have any extensibility like